[BUG] Ink rendering crash "<Box> can't be nested inside <Text>" when teammate requests sandbox bypass permission
Summary
When a teammate agent running in a sandboxed worktree attempts a command that requires out-of-sandbox permission (e.g., network access via curl), the permission-prompt UI crashes with an Ink rendering error. The teammate becomes unresponsive after the crash and does not process further messages, including shutdown_request.
Environment
- Claude Code:
2.1.118 - Platform: Linux (RHEL 9, kernel 5.14.0-570)
- Bubblewrap: 0.4.1
CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1- Reproduces on both
claude-opus-4-6[1M]andclaude-opus-4-7[1M]
Reproduction
TeamCreate({team_name: "repro"})- Spawn a general-purpose teammate with worktree isolation:
``json``
{
"subagent_type": "general-purpose",
"team_name": "repro",
"isolation": "worktree",
"prompt": "Run: curl -s https://httpbin.org/get (no dangerouslyDisableSandbox)"
}
- The worktree's
settings.local.jsonhassandbox.enabled: truewith--unshare-net, socurltriggers a permission prompt for sandbox bypass. - The teammate's tmux pane crashes with:
ERROR <Box> can't be nested inside <Text> component
/$bunfs/root/src/entrypoints/cli.js:496:249
Stack trace frames include createInstance, DI, SzH, WGH, oUH, rUH, Jp, tH, NH, oH at cli.js:478.
Impact
- Teammate becomes completely unresponsive after the crash
- Does not process subsequent messages or
shutdown_request - Only recovery is killing the tmux pane manually
- Does NOT occur when teammate runs on the main tree with sandbox disabled (no prompt = no crash)
Expected
The sandbox-bypass permission prompt should render correctly and allow the user to approve or deny.
Notes
- A separate but related issue: the unresponsive teammate does not accept
shutdown_requestvia SendMessage after the crash, so it cannot be cleaned up programmatically.
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗