Stop terminal activity after interrupted turns (#2942)
* fix(terminal): clear activity when turns are interrupted Some terminal agents do not emit a stop lifecycle hook after a user interrupt. Treat exact interrupt key frames as cancellation at the terminal input boundary so running state cannot stick, and clear rather than finish to avoid completion attention. * test(terminal): use platform shell in interruption tests Let the terminal test fixture select the platform default shell so the interruption cases reach their assertions on Windows.
This commit is contained in:
@@ -53,6 +53,11 @@ Claude hook mapping:
|
||||
- `Stop`, `StopFailure`, `SessionEnd` → `idle`
|
||||
- `Notification` with `reason` or `matcher` equal to `idle_prompt` → `needs-input`
|
||||
|
||||
Claude does not run `Stop` when the user interrupts a turn. A standalone Ctrl-C or Escape input
|
||||
while terminal activity is working clears the activity without finished attention. The same
|
||||
fallback applies to every hooked terminal agent; exact input matching excludes escape sequences and
|
||||
pasted content, while later provider idle events remain authoritative.
|
||||
|
||||
Codex hook mapping:
|
||||
|
||||
- `UserPromptSubmit` → `running`
|
||||
|
||||
Reference in New Issue
Block a user