CLI Crash on Startup Due to Ink Rendering Error (TypeError: undefined is not an object evaluating 'B.code')
Resolved 💬 4 comments Opened Oct 25, 2025 by VirtueMe Closed Jan 11, 2026
Description
Claude Code CLI crashes immediately on startup with a TypeError in the Ink rendering layer.
Environment
- Platform: Linux 6.1.0-40-amd64
- Date: 2025-10-25
- Trigger: CLI startup (first launch, not a restart)
Error Details
The crash occurs with the following error:
TypeError: undefined is not an object (evaluating 'B.code')
at /$bunfs/root/claude:194:3100
at map (native:1:11)
at aYA (/$bunfs/root/claude:194:3093)
at FzB (/$bunfs/root/claude:194:4206)
at /$bunfs/root/claude:195:927
at map (native:1:11)
at get (/$bunfs/root/claude:195:784)
at /$bunfs/root/claude:196:667
at onRender (/$bunfs/root/claude:213:5546)
at /$bunfs/root/claude:95:1901
Followed by:
error: Minified React error #327; visit https://reactjs.org/docs/error-decoder.html?invariant=327 for the full message or use the non-minified dev environment for full errors and additional helpful warnings.
at xw (/$bunfs/root/claude:101:35146)
at JI (/$bunfs/root/claude:99:4842)
at VB0 (/$bunfs/root/claude:95:5022)
at GB0 (/$bunfs/root/claude:95:5443)
Analysis
The error occurs in the Ink (React terminal UI) rendering layer, specifically during ANSI color code processing:
- Line 194: Color/theme code processing attempting to access
B.codewhich is undefined - This triggers during the
onRendercallback - Cascades into React error #327 (related to setState/render issues)
Impact
- CLI requires restart to recover
- Happens during initial startup
- Complete crash, not a graceful error
Reproduction
Unknown - occurred during normal CLI startup. May be related to:
- Terminal emulator ANSI code support
- Theme/color configuration
- Specific terminal environment variables
Additional Context
User had a VitePress project open with custom.css file when the crash occurred, though it's unclear if this is related to the crash.
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗