[BUG] Teammate CLI crashes when receiving permission_response

Resolved 💬 4 comments Opened Apr 22, 2026 by kcwang-tw Closed Apr 28, 2026

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?

Agent Team teammates crash immediately upon receiving a permission_response from the team lead. Reproduces 100% — occurred 2/2 times within a single session, with identical stack traces at the same trigger point, across different agent roles.

What Should Happen?

  • After receiving permission_response, the teammate should execute the approved Bash command
  • Execution result (stdout / stderr / exit code) should be returned to the team lead
  • An idle notification should be emitted afterwards
  • Even if the command itself fails, the teammate process should not crash
  • If the teammate hits an unrecoverable error, it should shut down gracefully:
  • Notify the team lead with the crash reason
  • Automatically set isActive: false in config.json
  • TeamDelete should succeed without manual intervention

Error Messages/Logs

Environment:
Claude Code version: 2.1.117
Platform: macOS (Darwin 25.4.0)
Shell: zsh
Teammate backend: tmux
Teammate model: sonnet
Teammate agentType: custom (.claude/agents/backend-dev.md, .claude/agents/frontend-dev.md)

Stack trace captured from the teammate's tmux pane (identical across both crashes):
- createInstance (/$bunfs/root/src/entrypoints/cli.js:495:249)
- BU             (/$bunfs/root/src/entrypoints/cli.js:477:57938)
- gTH            (/$bunfs/root/src/entrypoints/cli.js:477:87786)
- XWH            (/$bunfs/root/src/entrypoints/cli.js:477:86997)
- bgH            (/$bunfs/root/src/entrypoints/cli.js:477:85896)
- Ir             (/$bunfs/root/src/entrypoints/cli.js:477:85717)
- MWH            (/$bunfs/root/src/entrypoints/cli.js:477:82456)
- T_             (/$bunfs/root/src/entrypoints/cli.js:477:6497)
- hH             (/$bunfs/root/src/entrypoints/cli.js:477:4980)
- eH             (/$bunfs/root/src/entrypoints/cli.js:477:5281)

Message flow (observed in ~/.claude/teams/{team}/inboxes/):
1. teammate → team-lead: permission_request
   { tool_name: "Bash", input: { command: "git push && git log --oneline -4" } }

2. team-lead → teammate: permission_response
   { type: "permission_response", subtype: "success",
     response: { updated_input: { command: "git push && git log --oneline -4" } } }

3. (no further messages from teammate — pane shows the stack trace above)

Minimal reproduction steps:
1. Start a Claude Code session as the team lead (claude)
2. Call TeamCreate to create a team, then Agent to spawn a teammate with tmux backend
3. Assign the teammate any task that culminates in a git push (or any Bash command that triggers a permission_request)
4. Approve the permission request from the team lead
5. Observe the teammate's tmux pane — the stack trace above appears and the teammate stops responding

Steps to Reproduce

  1. Team lead (parent Claude Code session) spawns a teammate via TeamCreate + Agent (tmux backend, model: sonnet)
  2. Teammate completes its primary task — git commits are created, working tree is clean
  3. Teammate sends a permission_request via its inbox, asking to run a Bash command (in both cases: git push)
  4. Team lead replies with permission_response containing approve: true
  5. At that moment, the teammate CLI process crashes:
  • The approved command is never executed
  • No idle notification is emitted
  • The plain-text report body intended for the team lead is lost
  • ~/.claude/teams/{team}/config.json still has isActive: true for the dead member (requires manual edit)

Claude Model

Opus

Is this a regression?

Yes, this worked in a previous version

Last Working Version

_No response_

Claude Code Version

2.1.117

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

iTerm2

Additional Information

_No response_

View original on GitHub ↗

This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗