Skip to content

Conversation

@kdcokenny
Copy link
Collaborator

@kdcokenny kdcokenny commented Jan 13, 2026

Fixes #577

This PR replaces #578 which was contaminated by a bad rebase.

Changes

  • Implement hybrid abort detection for reliable ESC ESC handling in todo-continuation-enforcer

Summary by cubic

Improves ESC ESC abort handling by adding reliable hybrid detection in todo-continuation-enforcer, preventing unwanted TODO continuation after user cancels.

  • Bug Fixes
    • Add event-based abort detection via session.error (MessageAbortedError/AbortError) with a 3s window; skip continuation when triggered.
    • Keep API-based check as a fallback if the event is missed.
    • Clear abort flag on new user/assistant messages and tool execution.
    • Add 8 tests covering event-vs-API precedence, staleness, and flag clearing.

Written for commit 3920f84. Summary will update on new commits.

- Add event-based abort detection as primary method
- Keep API-based detection as fallback
- Track abort events via session.error with 3s time window
- Clear abort flag on user/assistant activity and tool execution
- Add comprehensive tests for hybrid approach (8 new test cases)
- All 663 tests pass

Fixes #577
Copy link

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 2 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

@kdcokenny kdcokenny merged commit 1f47ea9 into dev Jan 13, 2026
3 checks passed
@kdcokenny kdcokenny deleted the fix/todo-continuation-abort branch January 13, 2026 16:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: TODO Continuation is too aggressive when user interrupts agent

3 participants