[BUG] Navigating between subagent views is deeply busted
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?
After clicking into a subagent in the CLI, using the ↑ arrow key will restore the superagent’s initial prompts.
https://github.com/user-attachments/assets/1d882fb3-1a4e-4621-85bb-b15c3a3b9c94
<img width="2400" height="2742" alt="Image" src="https://github.com/user-attachments/assets/eaab997c-c55a-4db0-a417-cb3653267393" />
What Should Happen?
There are three expectations which are nonsensically violated here:
- when clicking on a subagent, all arrow keys should assume the agent selector is focused, and the ↑ and ↓ arrow keys should only select agents
- when navigating back to the text input, the text input should only be focused, and any sort of history action should not be triggered
- when navigating previous inputs, inter-agent prompts should be excluded from the history
Error Messages/Logs
There are no error messages or logs here. This is just terrible UX. Usually I get so disoriented that I try to hit Ctrl-C, Ctrl-L, or Esc and all of these keystrokes do incomprehensibly destructive actions in Claude Code. This disorientation is compounded by the fact that for some reason, when input is long, the agent list completely disappears in the UI.
Steps to Reproduce
- Tell an agent to create a subagent with a specific prompt
- Click into the subagent in the view.
- Press the ↑ arrow key
Claude Model
Not sure / Multiple models
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
2.1.251 (Claude Code)
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Terminal.app (macOS)
Additional Information
Possibly related issues #59936 and #62736