[Bug] Crash on subagent start: Box component nesting error in Ink renderer

Status Fixed / completed
Reported on v2.1.118
Maintainer reply ✓ Yes — mhegazy
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"}]

View original on GitHub ↗

4 Comments

github-actions[bot] · 4 months ago

Found 3 possible duplicate issues:

  1. https://github.com/anthropics/claude-code/issues/52098
  2. https://github.com/anthropics/claude-code/issues/51818
  3. https://github.com/anthropics/claude-code/issues/52139

This issue will be automatically closed as a duplicate in 3 days.

  • If your issue is a duplicate, please close it and 👍 the existing issue instead
  • To prevent auto-closure, add a comment or 👎 this comment

🤖 Generated with Claude Code

KamaruSama · 4 months ago

Can confirm this crash is not macOS-specific. Same bug reproduces 100% on Linux across two unrelated environments:

  1. Arch Linux, Hyprland/Wayland, kitty terminal + tmux, Node 24 via mise
  2. Ubuntu VPS, headless (plain TTY, no Wayland / no GUI / no kitty / no fcitx), tmux, Node

Since the second environment (Ubuntu headless VPS) shares almost nothing with macOS or desktop Linux, platform is ruled out. Suggest dropping the platform:macos label — the bug is platform-independent.

Version data (identical behavior on both Linux envs):

| Version | TeamCreate → teammate spawn |
|---|---|
| 2.1.118 | crash every time (same createInstance (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 + direct claude exec with the args the orchestrator would pass) does not crash. The crash is specific to the internal spawn path used by TeamCreate, 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.

mhegazy contributor · 4 months ago

Thanks for reporting. fix should be in tommorow's release.

github-actions[bot] · 4 months ago

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.