claude-code - 💡(How to fix) Fix Ink render panic on Agent-Teams subagent spawn (createInstance cli.js:502:249, v2.1.119) [5 comments, 4 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#53200Fetched 2026-04-26 05:21:47
View on GitHub
Comments
5
Participants
4
Timeline
13
Reactions
0
Timeline (top)
commented ×5labeled ×5cross-referenced ×1mentioned ×1

Error Message

#52337 — Agent Teams: subagent crashes with <Box> in <Text> Ink error on sensitive-path Edit/Write. Same createInstance panic, same call frames (BU/PL, gTH/LYH, XWH/rZH, T_/jM_, hH/LH, eH/FH). Line numbers shifted from 495:249 (2.1.117/118) to 502:249 (2.1.119) — consistent with the same code expanding by ~7 lines minified between releases.

Fix Action

Workaround

  • Stay on 2.1.119; do not upgrade to 2.1.120 (separately broken — see #53086, g9H is not a function on --resume).
  • For tasks that don't require dashboard tile / tmux pane visibility, fall back to plain unnamed Agent subagents (no team_name).

Code Example

createInstance (/$bunfs/root/src/entrypoints/cli.js:502:249)
PL  (/$bunfs/root/src/entrypoints/cli.js:484:58456)
LYH (/$bunfs/root/src/entrypoints/cli.js:484:88642)
rZH (/$bunfs/root/src/entrypoints/cli.js:484:87842)
RD6 (/$bunfs/root/src/entrypoints/cli.js:484:86738)
iZH (/$bunfs/root/src/entrypoints/cli.js:484:86558)
jM_ (/$bunfs/root/src/entrypoints/cli.js:484:83272)
aH  (/$bunfs/root/src/entrypoints/cli.js:484:6552)
LH  (/$bunfs/root/src/entrypoints/cli.js:484:5006)
FH  (/$bunfs/root/src/entrypoints/cli.js:484:5318)
RAW_BUFFERClick to expand / collapse

Claude Code version: 2.1.119 Platform: macOS (Darwin 25.2.0), arm64 Mode: Agent Teams (team_name + name parameters set on the Agent tool, creating a tmux-window teammate)

What happens

When the orchestrator session spawns a named teammate via the Agent tool with both team_name and name set, the freshly-spawned subagent process panics during initial Ink/UI render — before any tool call or user input. The pane dumps the bundle's minified JSX/Ink source to stdout followed by a stack trace, then becomes unresponsive (raw escape sequences from subsequent typing show but are not processed).

Reproduces 100% across two consecutive spawn attempts in the same session, ~5 minutes apart, with the same logical task. Reproduces with different brief sizes — does not appear prompt-dependent.

Stack trace (top frames)

createInstance (/$bunfs/root/src/entrypoints/cli.js:502:249)
PL  (/$bunfs/root/src/entrypoints/cli.js:484:58456)
LYH (/$bunfs/root/src/entrypoints/cli.js:484:88642)
rZH (/$bunfs/root/src/entrypoints/cli.js:484:87842)
RD6 (/$bunfs/root/src/entrypoints/cli.js:484:86738)
iZH (/$bunfs/root/src/entrypoints/cli.js:484:86558)
jM_ (/$bunfs/root/src/entrypoints/cli.js:484:83272)
aH  (/$bunfs/root/src/entrypoints/cli.js:484:6552)
LH  (/$bunfs/root/src/entrypoints/cli.js:484:5006)
FH  (/$bunfs/root/src/entrypoints/cli.js:484:5318)

The minified source dumped above the stack trace contains Ink box/text props handling: flexWrap, flexDirection, flexGrow, flexShrink, marginX, paddingX, onFocusCapture, onBlurCapture, hoverIgnoresBlankCells, ink-box, ink-text, textWrap. Strongly suggests an Ink (React-for-CLI) initial-render panic.

(Two crash-pane screenshots will be added in a follow-up comment.)

What still works (scope)

  • Main session at the same Claude Code version: unaffected.
  • Plain unnamed Agent subagents (no team_name, no name): work fine. Smoke-tested with a trivial Read+return task — completed in 6.9s, no crash.
  • Crash is specific to the named teammate spawn path that creates the dedicated tmux pane.

Likely related: #52337

#52337 — Agent Teams: subagent crashes with <Box> in <Text> Ink error on sensitive-path Edit/Write. Same createInstance panic, same call frames (BU/PL, gTH/LYH, XWH/rZH, T_/jM_, hH/LH, eH/FH). Line numbers shifted from 495:249 (2.1.117/118) to 502:249 (2.1.119) — consistent with the same code expanding by ~7 lines minified between releases.

Mismatch on trigger: #52337 fires during an Edit/Write tool call against a sensitive path. This variant fires on initial UI render of the spawned pane, before any tool call. Likely the same Box-in-Text Ink-nesting bug surfacing on a different code path (spawn UI bootstrap rather than tool-call confirmation UI), so worth its own issue rather than a comment on #52337.

Reproduction

  1. Run Claude Code 2.1.119.
  2. From an orchestrator session, invoke the Agent tool with both team_name and name parameters set (creates a tmux-window teammate in Agent Teams mode).
  3. Subagent's pane immediately dumps minified Ink/JSX source + stack trace and stops responding to input. The subagent process stays alive (visible in ps, valid argv with --agent-name <name> --team-name <team>) but the Ink UI is dead.

Workaround

  • Stay on 2.1.119; do not upgrade to 2.1.120 (separately broken — see #53086, g9H is not a function on --resume).
  • For tasks that don't require dashboard tile / tmux pane visibility, fall back to plain unnamed Agent subagents (no team_name).

extent analysis

TL;DR

The issue can be worked around by using plain unnamed Agent subagents without team_name and name parameters.

Guidance

  • The crash is specific to the named teammate spawn path, suggesting an issue with Ink rendering in this context.
  • The stack trace and minified source suggest an Ink (React-for-CLI) initial-render panic, possibly related to Box-in-Text Ink-nesting bug.
  • To verify the issue, try reproducing it with different brief sizes and team names to confirm it's not prompt-dependent.
  • As a temporary workaround, use plain unnamed Agent subagents for tasks that don't require dashboard tile/tmux pane visibility.

Example

No code snippet is provided as the issue is related to a specific library (Ink) and its interaction with the Agent tool.

Notes

The issue is similar to #52337, but with a different trigger (initial UI render instead of Edit/Write tool call). The workaround is to avoid using named teammates until the issue is resolved.

Recommendation

Apply workaround: use plain unnamed Agent subagents for tasks that don't require dashboard tile/tmux pane visibility, as this has been confirmed to work fine.

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

claude-code - 💡(How to fix) Fix Ink render panic on Agent-Teams subagent spawn (createInstance cli.js:502:249, v2.1.119) [5 comments, 4 participants]