-
-
Notifications
You must be signed in to change notification settings - Fork 80.7k
Bug: Stop-button abort races with compaction completion, causing model confusion #89868
Copy link
Copy link
Closed
Labels
P2Normal backlog priority with limited blast radius.Normal backlog priority with limited blast radius.clawsweeper:linked-pr-openClawSweeper found an open linked pull request for this issue.ClawSweeper found an open linked pull request for this issue.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:session-stateSession, memory, transcript, context, or agent state can drift or corrupt.Session, memory, transcript, context, or agent state can drift or corrupt.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.
Description
Metadata
Metadata
Assignees
Labels
P2Normal backlog priority with limited blast radius.Normal backlog priority with limited blast radius.clawsweeper:linked-pr-openClawSweeper found an open linked pull request for this issue.ClawSweeper found an open linked pull request for this issue.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:session-stateSession, memory, transcript, context, or agent state can drift or corrupt.Session, memory, transcript, context, or agent state can drift or corrupt.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.
Type
Fields
Priority
None yet
Bug: Stop-button abort races with compaction completion, causing model confusion
Description
When a user presses the stop button during an auto-compaction, the abort signal cancels the wait for compaction but the compaction LLM call continues in-flight and writes its result to the session transcript. This causes the model to receive only a compaction summary instead of the full context, leading to confused responses.
Note: The full transcript is preserved on disk — this is not data loss. The problem is model confusion, not user confusion.
Reproduction
context overflow detected; attempting auto-compaction)compaction wait aborted+AbortError: This operation was abortedEvidence from logs
Root Cause
In
selection-BMP-JCML.js:unsubscribe()(line ~5817) callssession.abortCompaction()but this only signals the session managerwasAbortedand skipsincrementCompactionCount(), but the session file has already been modified by the session manager's compaction handlerExpected Behavior
When
externalAbort=trueand compaction was in-flight, the compaction result should be discarded (rolled back) rather than applied to the session. The session should remain in its pre-compaction state.Impact
Environment