Ink render panic on Agent-Teams subagent spawn (createInstance cli.js:502:249, v2.1.119)
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
Agentsubagents (noteam_name, noname): 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
- Run Claude Code 2.1.119.
- From an orchestrator session, invoke the
Agenttool with bothteam_nameandnameparameters set (creates a tmux-window teammate in Agent Teams mode). - 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 functionon--resume). - For tasks that don't require dashboard tile / tmux pane visibility, fall back to plain unnamed
Agentsubagents (noteam_name).
This issue has 9 comments on GitHub. Read the full discussion on GitHub ↗