[DOCS] Agent view Ctrl+C guidance is outdated for attached `!` commands
Documentation Type
Incorrect/outdated documentation
Documentation Location
https://code.claude.com/docs/en/agent-view
Section/Topic
"Attach to a session" in Agent view, plus the Ctrl+C behavior described for interactive ! shell commands
Current Documentation
The docs currently say on https://code.claude.com/docs/en/agent-view:
While attached, the session behaves like any other Claude Code session: every command, keyboard shortcut, and feature works. Detaching never stops a background session:←,Ctrl+C,Ctrl+D,Ctrl+Z, and/exitall leave it running. To end a session from inside it, run/stop.
And https://code.claude.com/docs/en/interactive-mode says:
| Ctrl+C | Cancel current input or generation | Standard interrupt |
It also documents ! shell mode as a foreground command flow with live output:
Shell mode: Adds the command and its output to the conversation context Shows real-time progress and output * Supports the same Ctrl+B backgrounding for long-running commands
What's Wrong or Missing?
As of v2.1.144, attached ! <cmd> exec sessions now interrupt the running command when you press Ctrl+C. The current Agent view wording still says Ctrl+C always leaves an attached background session running, which is no longer accurate for this attached-shell-command case.
The docs also do not explain which Ctrl+C behavior takes precedence when you are attached to a background session that is actively running a foreground ! command. That leaves the current guidance internally inconsistent: one page describes Ctrl+C as the standard interrupt, while Agent view describes it as a detach/leave-running action.
Suggested Improvement
Update the Agent view attach section to distinguish between:
- Ctrl+C at an idle attached background-session prompt
- Ctrl+C while an attached foreground
!command is actively running
For example, replace the current blanket statement with wording that explains that attached ! commands follow interrupt behavior in v2.1.144, while /stop is still the way to end the background session itself.
Also add a short note or cross-reference in interactive-mode under ! shell mode so users can tell whether Ctrl+C interrupts the command or detaches from the session when that command is running inside an attached background session.
Impact
Medium - Makes feature difficult to understand
Additional Context
Affected Pages:
| Page | Line(s) | Context |
|------|---------|---------|
| https://code.claude.com/docs/en/agent-view | 161-167, 218 | Attached-session behavior says Ctrl+C leaves the session running |
| https://code.claude.com/docs/en/interactive-mode | 27, 277-283 | Ctrl+C is documented as the standard interrupt, and ! shell mode is documented as a live command flow |
Total scope: 2 pages affected
Relevant behavior changed in v2.1.144: attached ! <cmd> exec sessions now interrupt the running command on Ctrl+C.
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗