Skip to content

Esc and Ctrl+C stop the live turn - #520

Merged
currentbits merged 1 commit into
mainfrom
coder/esc-ctrl-c-in-the-composer-stops-the-liv-914612
Aug 18, 2026
Merged

currentbits merged 1 commit into
mainfrom
coder/esc-ctrl-c-in-the-composer-stops-the-liv-914612

Conversation

@currentbits

Copy link
Copy Markdown
Owner

Summary

Fixes #478. One key stops the agent.

While a thread is working and no composer menu is open, Esc calls stopRun. The draft stays. Ctrl+C in the composer does the same when nothing is selected, so copy still works on a highlighted draft. Cmd+C is not intercepted.

Idle double-Esc rewinds the last turn (same path as /rewind). A single idle Esc does nothing.

Why

Stop was a click on the status strip. You look up from the composer, the agent is about to rm something, and Esc did nothing. That is how unsupervised damage lands.

#315 is the backend actually dying. This is the key.

Contract

  • Working + Esc → stopRun; draft stays
  • Working + Ctrl+C, no selection → stopRun
  • Working + Ctrl+C with a selection → copy, no stop
  • Menu open + Esc → close menu only
  • Idle + Esc → no stop
  • Idle + Esc Esc → rewind confirm

Modals, the narrow drawer, notes, and rename keep Esc. Permission prompts do not — that is the interrupt case.

The Stop button title is Esc · Ctrl+C. The keyboard sheet lists the chords.

Tests

node --import=./test/support/disable-grok-mcp.mjs --import=./test/support/render.mjs \
  --experimental-strip-types --test --test-timeout=20000 \
  test/composerStop.test.tsx

10 pass.

  • PR created by the Grok agent

Esc interrupts a working thread without discarding the draft. Ctrl+C
does the same when the composer has no selection, so copy still works
on highlighted text. Idle double-Esc rewinds the last turn.
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@currentbits
currentbits merged commit d857185 into main Aug 18, 2026
2 of 6 checks passed
@currentbits
currentbits deleted the coder/esc-ctrl-c-in-the-composer-stops-the-liv-914612 branch October 3, 2026 16:07
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.

Esc / Ctrl+C in the composer stops the live turn

1 participant