[Bug] Crash on subagent start: Box component nesting error in Ink renderer
Status Fixed / completed
Reported on v2.1.118
Maintainer reply ✓ Yes — mhegazy
Workaround ✓ Mentioned in thread ↓
Activity 4 comments · opened Apr 23, 2026 · closed Apr 23, 2026
💡 Likely answer: A maintainer (mhegazy, contributor)
responded on this thread — see the highlighted reply below.
Bug Description
Crash on subagent start: <Box> can't be nested inside <Text> component thrown from createInstance in Ink renderer. Reproducible 100% when team subagent (spawned via Agent tool with team_name) connects via claude --agent-id ... --agent-name ... --team-name ... --agent-type developer --model sonnet. Version 2.1.118, macOS Darwin 25.3.0. Stack: createInstance (cli.js:496:249) → jS → E$H → WRH → nFH → lFH → Rp → tH → NH → oH.
Environment Info
- Platform: darwin
- Terminal: iTerm.app
- Version: 2.1.118
- Feedback ID: a5e928c9-75fd-45b7-9ad4-250f1f706dec
Errors
[{"error":"Error: NON-FATAL: Lock acquisition failed for /Users/{user}/.local/share/claude/versions/2.1.118 (expected in multi-process scenarios)\n at ai_ (/$bunfs/root/src/entrypoints/cli.js:2756:2177)\n at IK8 (/$bunfs/root/src/entrypoints/cli.js:2756:1257)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-23T05:54:52.057Z"}]
4 Comments
Found 3 possible duplicate issues:
This issue will be automatically closed as a duplicate in 3 days.
🤖 Generated with Claude Code
Can confirm this crash is not macOS-specific. Same bug reproduces 100% on Linux across two unrelated environments:
Since the second environment (Ubuntu headless VPS) shares almost nothing with macOS or desktop Linux, platform is ruled out. Suggest dropping the
platform:macoslabel — the bug is platform-independent.Version data (identical behavior on both Linux envs):
| Version | TeamCreate → teammate spawn |
|---|---|
|
2.1.118| crash every time (samecreateInstance (cli.js:496:249)stack) ||
2.1.89| works |Clean regression between 2.1.89 and 2.1.118.
Trigger narrowing — running the same teammate command manually (
tmux new -d+ directclaudeexec with the args the orchestrator would pass) does not crash. The crash is specific to the internal spawn path used byTeamCreate, independent of the teammate's own arguments or environment.Related cluster of open issues that all appear to be the same root cause (
<Box>nested inside<Text>Ink invariant violation) triggered at different render sites: #52098 #52139 #51855 #51818 #52299.Workaround for anyone blocked:
npm install -g @anthropic-ai/claude-code@2.1.89.Thanks for reporting. fix should be in tommorow's release.
This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.