Crash: React reconciler throws 'undefined is not an object' in Bun runtime
Bug Report
Claude Code crashes with an unhandled React error during a session using agent teams with Opus 4.6.
Environment
- Claude Code version: 2.1.32
- OS: macOS (Darwin 25.2.0)
- Model: Claude Opus 4.6
- Feature in use: Agent teams (multi-agent coordination)
Error
ERROR undefined is not an object (evaluating 'U.length')
/$bunfs/root/claude:685:20565
Stack Trace
- i$ (/$bunfs/root/claude:685:20565)
- YY (/$bunfs/root/claude:685:29777)
- <anonymous> (/$bunfs/root/claude:191:8939)
- U_0 (/$bunfs/root/claude:7325:8047)
- k$T (/$bunfs/root/claude:7338:10320)
- R$ (/$bunfs/root/claude:685:20775)
- V6 (/$bunfs/root/claude:685:39175)
- xx (/$bunfs/root/claude:685:49797)
- mx (/$bunfs/root/claude:685:86054)
- ke (/$bunfs/root/claude:685:85028)
Analysis
The crash occurs inside React's minified fiber reconciler running in Bun's virtual filesystem ($bunfs). Based on the deminified stack:
i$→ Lazy component resolution ($_/_init)YY→useMemohookR$→renderWithHooksV6→ Function component renderxx→beginWork(React work loop)mx→performUnitOfWorkke→workLoopSync
The error suggests a component or its dependency resolved to undefined where an object with .length was expected — likely a lazy-loaded component or a memo dependency that wasn't properly initialized.
Steps to Reproduce
- Start Claude Code v2.1.32
- Use agent teams feature with Opus 4.6 model
- Session terminates unexpectedly with the above error
Expected Behavior
The session should not crash with an unhandled React error.
Additional Context
The full minified React reconciler source was dumped to the terminal (thousands of lines), which also impacts the user experience on crash. A crash boundary or more graceful error handling would be helpful.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗