[BUG] /usage + Escape becomes unrecoverable after re-selecting a session via agent view
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
In Claude Code terminal invoking /usage while Claude is generating a response, then pressing Escape, works correctly the first time in a freshly created session. But after leaving that session (left arrow key or close the terminal) When re-selecting the same session via the agent view, repeating the exact same sequence (/usage while thinking then press Escape) leaves the session permanently stuck. Escape no longer returns to the discussion, and no key combination recovers it. Only killing all Claude Code processes resolves it.
What Should Happen?
/usage followed by Escape should behave identically regardless of whether the session was just created or re-entered via the agent view. It should never leave the session unrecoverable, and --continue should not resurrect the stuck state.
Error Messages/Logs
Steps to Reproduce
- Open a terminal in VS Code (integrated terminal) in a new/empty folder
- Run
claude. - Make a request.While Claude is thinking, type
/usage, then press Escape. It works as expected: returns to the discussion normally. - Press the left arrow key to go back to the agent view (https://code.claude.com/docs/en/agent-view)
- Re-select the session just created by pressing the right arrow key.
- Make another request.
- While Claude is thinking, type
/usage, then press Escape. Now you are stuck: Escape (and Ctrl+C, Ctrl+D, /exit) no longer work. - Close the terminal and reopen with
claude agents: still stuck in /usage. - The only recovery is killing all Claude Code processes;
Claude Model
Sonnet (default)
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
2.1.280
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
VS Code integrated terminal
Additional Information
_No response_