Crash: React error when accepting plan with CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS enabled

Resolved 💬 3 comments Opened Feb 5, 2026 by TomasMurua Closed Feb 7, 2026

Bug Description

Claude Code crashes with a React reconciler error when accepting an implementation plan with the experimental Agent Teams feature enabled.

The crash occurs immediately after approving a plan in plan mode. The error is a React internal error in the TUI rendering layer.

Steps to Reproduce

  1. Enable Agent Teams in ~/.claude/settings.json:

``json
{
"env": {
"CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS": "1"
}
}
``

  1. Start a Claude Code session in plan mode
  2. Let Claude generate an implementation plan
  3. Accept/approve the plan
  4. Claude Code crashes immediately

Error Output

ERROR  undefined is not an object (evaluating 'U.length')

/$bunfs/root/claude:685:20565

Stack Trace (key frames)

- i$ (/$bunfs/root/claude:685:20565)
- gJ (/$bunfs/root/claude:685:28719)
- nG (/$bunfs/root/claude:685:28873)
- I1 (/$bunfs/root/claude:685:25085)   ← useSyncExternalStore
- <anonymous> (/$bunfs/root/claude:191:9236)
- WR (/$bunfs/root/claude:3623:4221)
- x_0 (/$bunfs/root/claude:7325:12534)
- k$T (/$bunfs/root/claude:7338:10259)
- R$ (/$bunfs/root/claude:685:20775)
- V6 (/$bunfs/root/claude:685:39175)

The error is in React's useSyncExternalStore hook within the minified reconciler code at /$bunfs/root/claude. This suggests a state synchronization issue in the Teams UI component when transitioning from plan approval to execution.

Environment

  • Claude Code version: 2.1.32
  • OS: macOS 26.2 (arm64 / Apple Silicon)
  • Bun: 1.3.7
  • Terminal: Standard macOS Terminal

Additional Context

  • The feature was enabled following the announcement that Agent Teams is now available as an experimental feature
  • Without the CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS flag, plan mode works correctly
  • The crash is 100% reproducible on plan acceptance
  • Several plugins were active: context7, claude-md-management, claude-hud, claude-code-setup, supabase, sentry, superpowers

Workaround

Removing the CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS env var from settings resolves the crash.

View original on GitHub ↗

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