[BUG] Ink rendering crash "<Box> can't be nested inside <Text>" when teammate requests sandbox bypass permission

Resolved 💬 4 comments Opened Apr 23, 2026 by yucizhou Closed Apr 28, 2026

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] and claude-opus-4-7[1M]

Reproduction

  1. TeamCreate({team_name: "repro"})
  2. 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)"
}
``

  1. The worktree's settings.local.json has sandbox.enabled: true with --unshare-net, so curl triggers a permission prompt for sandbox bypass.
  2. 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_request via SendMessage after the crash, so it cannot be cleaned up programmatically.

View original on GitHub ↗

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