Team-lead Claude Code crashes with stack overflow in rQ7/permission-explainer after teammate permission request

Resolved 💬 7 comments Opened Apr 16, 2026 by stevenellis-od Closed Apr 18, 2026

What happened

Running Claude Code v2.1.111 (Opus 4.7, xhigh effort, 1M context) as a team lead with 3 teammates spawned via TeamCreate (team name price-1073-parallel, all teammates in split tmux panes with CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1). The teammates each sent permission requests to the lead. Shortly after the lead emitted a "Proceed with all three? y/n" prompt and I replied, the lead pane:

  1. Dumped a large block of minified cli.js source directly to the terminal (functions W$8, mb1, lQ7, pb1, Z$8, ib1, qx1, Kx1, gM6, rQ7, …)
  2. Printed an apparent stack overflow with deep aLH ↔ rV recursion inside cli.js:477

The lead process is now gone. The 3 teammate panes are still alive but permanently stuck on "Waiting for team lead approval" — their permission requests have no recipient.

Possible regression

Same team-lead + teammates workflow was run recently on Opus 4.6 (Claude Code version unknown, but older than 2.1.111) without this crash. Something between that version and 2.1.111 / Opus 4.7 appears to have regressed — the permission-explainer path, Opus 4.7 message shape, or agent-teams interaction with either.

Stack trace (tail, pane scrollback)

<anonymous> (/$bunfs/root/src/entrypoints/cli.js:8233:15642)
$2          (/$bunfs/root/src/entrypoints/cli.js:477:63169)
aLH         (/$bunfs/root/src/entrypoints/cli.js:477:76220)
rV          (/$bunfs/root/src/entrypoints/cli.js:477:76101)
aLH         (/$bunfs/root/src/entrypoints/cli.js:477:76199)
rV          (/$bunfs/root/src/entrypoints/cli.js:477:76101)
aLH         (/$bunfs/root/src/entrypoints/cli.js:477:76199)
rV          (/$bunfs/root/src/entrypoints/cli.js:477:76101)
[aLH/rV pair repeats]

The 8233:15642 frame points at rQ7({toolName, toolInput, toolDescription, messages, signal}) — gated on gM6() = permissionExplainerEnabled. It calls Kx1(messages, 1000) to build a context string. The repeating aLH ↔ rV pair looks like an unbounded Ink/React render walk.

Repro signal

  • Team lead + 3 teammates, all sending near-simultaneous permission requests to the lead
  • permissionExplainer path active (default)
  • Crash was deterministic on the next y/n reply — not a transient API error

Impact

  • Orphaned teammates can never be approved and hold tmux panes open indefinitely
  • Lead context (conversation history, queued messages) lost unless /resumed

Workarounds

  • tmux kill-session the orphaned team
  • /resume the lead session from jsonl (worked — session id 418f39ef-… was recoverable)

Environment

  • claude --version: 2.1.111
  • Bun-bundled single-file CLI (/$bunfs/root/src/entrypoints/cli.js)
  • Linux 6.8.0 (Ubuntu EC2)
  • Model: Opus 4.7 (1M context), xhigh effort
  • Feature: CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1
  • Previously worked: same workflow on Opus 4.6, earlier CC version

View original on GitHub ↗

This issue has 7 comments on GitHub. Read the full discussion on GitHub ↗