[BUG] Terminal corruption when permission prompt appears while navigating Agent Teams agent selection menu
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?
When using Claude Agent Teams, when I press shift+<down arrow>, Claude Code displays an expanded UI where I can use shift+<up/down> to select between the running agents. If a permission prompt appears while I am navigating the agent select UI, the terminal output becomes garbled.
Screenshot of normal output, where I have positioned my cursor in the Agent Teams UI:
<img width="885" height="856" alt="Image" src="https://github.com/user-attachments/assets/45a7235f-be26-47d1-aaf7-7699382f4721" />
Screenshot of the garbled output after a permission prompt appeared while my cursor was in the Agent Team UI:
<img width="885" height="856" alt="Image" src="https://github.com/user-attachments/assets/b4a15fed-bdce-4e74-a311-a1fce2cde2b1" />
(notice the garbled text in the "Let me..." bullet)
What Should Happen?
I should be able to navigate the Agent Teams UI without the terminal output becoming garbled.
Error Messages/Logs
Steps to Reproduce
- Start Claude Code with
CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1in the environment - Execute a prompt that instructs Claude to form an agent team. I asked Claude to implement an internal dashboard, with both a web frontend and backend server component.
- Once Claude spawns the agents, press shift+<down arrow> to open the expanded agent list UI
- Position the cursor on one of the agents in the menu. Leave it in this position.
- Wait for a permission prompt to appear. It does not appear whether the currently selected agent is the one that generated the permission prompt.
Claude Model
Opus
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
2.1.153
Platform
AWS Bedrock
Operating System
macOS
Terminal/Shell
iTerm2
Additional Information
The screenshots were captured on Ghostty, but I was also able to produce the issue on iTerm2 and another terminal emulator.
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗