claude-code - 💡(How to fix) Fix [BUG] <Box> can't be nested inside <Text> crash when permission dialog renders in tmux split-pane spawned agent [5 comments, 6 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#52299Fetched 2026-04-24 06:10:51
View on GitHub
Comments
5
Participants
6
Timeline
16
Reactions
4
Timeline (top)
commented ×5labeled ×5cross-referenced ×4closed ×1

Error Message

When a sub-agent is spawned via CLAUDE_CODE_SPAWN_BACKEND=tmux with teammateMode: splitPane and permissions are set to ask, the agent crashes immediately with an Ink rendering error when it tries to show the permission prompt dialog.

Error Messages/Logs

ERROR <Box> can't be nested inside <Text> component Changing "ask" to "allow" in permissions prevents the crash — the permission dialog is never rendered so the Ink error is not triggered.

Fix Action

Fix / Workaround

Workaround Changing "ask" to "allow" in permissions prevents the crash — the permission dialog is never rendered so the Ink error is not triggered.

Code Example

Agent crashes with:

ERROR  <Box> can't be nested inside <Text> component
/$bunfs/root/src/entrypoints/cli.js:496:249
RAW_BUFFERClick to expand / collapse

Preflight Checklist

  • I have searched existing issues and this hasn't been reported yet
  • This is a single bug report (please file separate reports for different bugs)
  • I am using the latest version of Claude Code

What's Wrong?

When a sub-agent is spawned via CLAUDE_CODE_SPAWN_BACKEND=tmux with teammateMode: splitPane and permissions are set to ask, the agent crashes immediately with an Ink rendering error when it tries to show the permission prompt dialog.

What Should Happen?

Permission dialog renders and waits for user input.

Error Messages/Logs

Agent crashes with:

ERROR  <Box> can't be nested inside <Text> component
/$bunfs/root/src/entrypoints/cli.js:496:249

Steps to Reproduce

Set CLAUDE_CODE_SPAWN_BACKEND=tmux and teammateMode: splitPane in settings Set any permission to ask (e.g. Bash(), Read()) Spawn a sub-agent via agent teams — e.g.:

env CLAUDECODE=1 CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1 claude
--agent-id backend-dev@my-team
--agent-name backend-dev
--team-name my-team
--agent-color green
--parent-session-id <id>
--model sonnet

Agent triggers any tool that requires the permission prompt

Workaround Changing "ask" to "allow" in permissions prevents the crash — the permission dialog is never rendered so the Ink error is not triggered.

Claude Model

None

Is this a regression?

Yes, this worked in a previous version

Last Working Version

No response

Claude Code Version

v2.1.118

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Warp

Additional Information

No response

extent analysis

TL;DR

The issue can be worked around by changing the permission setting from "ask" to "allow", preventing the crash caused by the Ink rendering error.

Guidance

  • Verify that the issue is specific to the tmux backend and splitPane teammate mode by testing with different settings.
  • Check the Ink component documentation to ensure that <Box> is not being incorrectly nested inside a <Text> component.
  • Test the permission prompt dialog with different permission settings to see if the issue is specific to certain permissions.
  • Consider downgrading to a previous version of Claude Code, if the last working version can be determined, to temporarily resolve the issue.

Example

No code snippet is provided as the issue is related to a specific error in the Ink rendering and the code is not explicitly mentioned.

Notes

The issue seems to be a regression, and the last working version is not specified. The workaround provided may not be a permanent solution, and further investigation into the Ink rendering error is needed.

Recommendation

Apply workaround: changing the permission setting from "ask" to "allow" prevents the crash, but this may not be a desirable long-term solution, as it bypasses the permission prompt dialog.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING