-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Description
Type
Bug
Problem / Value
Cancelling a running response can leave the task in a broken state and wipe the stored conversation for that task. The chat box becomes unusable until the task is closed and reopened, disrupting work.
Context
Version: v3.22.5 • API Provider: anthropic • Model: sonnet-3.5.
Occurs when clicking Cancel during the model’s “thinking/streaming” phase. Intermittent but reproducible with timing. Affects anyone who cancels mid‑response.
Current behavior: the task may hang; the conversation history file is written as an empty list, and the chat input becomes unusable. Logs show “Found API conversation history file, but it’s empty (parsed as []).”
Expected behavior
Cancelling a task should not corrupt or clear the conversation history, and the chat should remain usable.
Reproduction
- Start a task with the model
- While the model is responding (especially during “thinking”)
- Click the Cancel button
- Observe the task may hang and the chat box becomes unusable
- Logs show the empty conversation history message
Constraints/Preferences
Use safe read‑modify‑write transactions (from PR #5332) for files defined in GlobalFileNames to prevent file corruption when in‑memory state is empty during a race condition.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status