fix: skip timeout compaction when run was aborted by user#80746
fix: skip timeout compaction when run was aborted by user#80746lykeion-dev wants to merge 1 commit into
Conversation
When the user presses the stop button in the Control UI, the model request times out. Previously, if context token usage exceeded 65%, the timeout compaction mechanism would fire even though the run was intentionally aborted — causing unnecessary compaction at an inappropriate time. Add !aborted check to the timeout compaction condition so that user-initiated stops skip compaction entirely.
|
Codex review: needs real behavior proof before merge. Summary Reproducibility: yes. for the PR-introduced regression by source inspection: ordinary timeouts call Real behavior proof Next step before merge Security Review findings
Review detailsBest possible solution: Preserve normal timeout-triggered compaction for internal timeouts while adding a targeted user-abort guard, likely based on Do we have a high-confidence way to reproduce the issue? Yes for the PR-introduced regression by source inspection: ordinary timeouts call Is this the best way to solve the issue? No. The change should distinguish user-initiated aborts from internal timeout aborts instead of blocking all aborted timeout attempts from timeout recovery. Full review comments:
Overall correctness: patch is incorrect What I checked:
Likely related people:
Remaining risk / open question:
Codex review notes: model gpt-5.5, reasoning high; reviewed against 9924fff1afc7. Re-review progress:
|
When the user presses the stop button in the Control UI, the model request times out. Previously, if context token usage exceeded 65%, the timeout compaction mechanism would fire even though the run was intentionally aborted — causing unnecessary compaction at an inappropriate time. Add !externalAbort check to the timeout compaction condition so that user-initiated stops skip compaction entirely. Unlike the original PR openclaw#80746 which used !aborted (incorrectly skipping internal timeout compaction too), this fix uses !externalAbort which is only set for user-initiated stops via the abort signal handler. Also updates the existing test to explicitly set externalAbort: false for the internal timeout case, and adds a new test for the user abort case. CHANGELOG: Added to Unreleased section.
No description provided.