[BUG] Claude Code V8 Engine Fatal Error - Unreachable Code

Resolved 💬 3 comments Opened Jun 11, 2025 by siakun Closed Dec 10, 2025

Bug Description

Claude Code crashes with a V8 fatal error ("unreachable code") when typing text input. The crash occurs in the V8 JavaScript engine's Turboshaft compiler during string operation optimization, resulting in an illegal instruction error that terminates the application.

Steps to Reproduce

  1. Open Windows Terminal (Windows 11 default)
  2. Start PowerShell
  3. Navigate to project directory:

``powershell
cd C:\Users\[USERNAME]\Documents\Dev\[PROJECT_FOLDER]
``

  1. Enter WSL:

``powershell
wsl
``

  1. Run Claude Code:

``bash
claude
``

  1. Start typing text input in Claude Code
  2. Application crashes immediately with V8 fatal error

Expected Behavior

Claude Code should handle text input without crashing and allow normal text editing/input operations.

Actual Behavior

Application terminates with a V8 fatal error showing "unreachable code" message and stack trace, followed by "Illegal instruction" error.

Additional Context

Claude Code Installation

  • Installed using nvm in WSL2 Ubuntu (without sudo)
  • Node.js v22.16.0 managed by nvm

Working Directory

Windows: C:\Users\[USERNAME]\Documents\Dev\[PROJECT_FOLDER]
WSL: /mnt/c/Users/[USERNAME]/Documents/Dev/[PROJECT_FOLDER]

System Information Collection Command

echo "=== Claude CLI Version ===" && \
claude --version && \
echo -e "\n=== Ubuntu Version ===" && \
lsb_release -a && \
echo -e "\n=== System Architecture ===" && \
uname -a && \
echo -e "\n=== Node.js Version ===" && \
node --version && \
echo -e "\n=== npm Version ===" && \
npm --version && \
echo -e "\n=== nvm Version ===" && \
nvm --version 2>/dev/null || echo "nvm not installed" && \
echo -e "\n=== Current Node (via nvm) ===" && \
nvm current 2>/dev/null || echo "N/A" && \
echo -e "\n=== Python3 Version ===" && \
python3 --version && \
echo -e "\n=== Git Version ===" && \
git --version && \
echo -e "\n=== Memory Info ===" && \
free -h

System Information Output

=== Claude CLI Version ===
1.0.18 (Claude Code)

=== Ubuntu Version ===
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 24.04.2 LTS
Release:        24.04
Codename:       noble

=== System Architecture ===
Linux [HOSTNAME] 5.15.146.1-microsoft-standard-WSL2 #1 SMP Thu Jan 11 04:09:03 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux

=== Node.js Version ===
v22.16.0

=== npm Version ===
10.9.2

=== nvm Version ===
0.40.3

=== Current Node (via nvm) ===
v22.16.0

=== Python3 Version ===
Python 3.12.3

=== Git Version ===
git version 2.43.0

=== Memory Info ===
               total        used        free      shared  buff/cache   available
Mem:            31Gi       745Mi        30Gi       2.6Mi       404Mi        30Gi
Swap:           16Gi          0B        16Gi

Full Error Output

Environment

  • Platform (select one):
  • [ ] Anthropic API
  • [ ] AWS Bedrock
  • [ ] Google Vertex AI
  • [x] Other: Claude Code CLI
  • Claude CLI version: 1.0.18 (Claude Code)
  • Operating System: Windows 11 with WSL2 (Ubuntu 24.04.2 LTS)
  • Terminal: Windows Terminal (Windows 11 default)
  • WSL Version: WSL2
  • System Architecture: x86_64 (Linux 5.15.146.1-microsoft-standard-WSL2)
  • Node.js: v22.16.0
  • npm: 10.9.2
  • nvm: 0.40.3
  • Python: 3.12.3
  • Git: 2.43.0
  • Available Memory: 30Gi free of 31Gi total
  • Installation Method: Installed via nvm (without sudo)

Error Details

Error Message

#
# Fatal error in , line 0
# unreachable code
#

Stack Trace

#FailureMessage Object: 0x7fab8d6a0c00
----- Native stack trace -----

 1: 0xff7201  [claude]
 2: 0x2862b6b V8_Fatal(char const*, ...) [claude]
 3: 0x1aff076  [claude]
 4: 0x2ecb728 v8::internal::compiler::turboshaft::V<v8::internal::compiler::turboshaft::Any> v8::internal::compiler::turboshaft::TurboshaftAssemblerOpInterface<v8::internal::compiler::turboshaft::ReducerStack<v8::internal::compiler::turboshaft::Assembler<v8::internal::compiler::turboshaft::reducer_list<v8::internal::compiler::turboshaft::TurboshaftAssemblerOpInterface, v8::internal::compiler::turboshaft::GraphVisitor, v8::internal::compiler::turboshaft::JSGenericLoweringReducer, v8::internal::compiler::turboshaft::DataViewLoweringReducer, v8::internal::compiler::turboshaft::MachineLoweringReducer, v8::internal::compiler::turboshaft::FastApiCallLoweringReducer, v8::internal::compiler::turboshaft::SelectLoweringReducer, v8::internal::compiler::turboshaft::MachineOptimizationReducer, v8::internal::compiler::turboshaft::TSReducerBase> >, false, v8::internal::compiler::turboshaft::GraphVisitor, v8::internal::compiler::turboshaft::JSGenericLoweringReducer, v8::internal::compiler::turboshaft::DataViewLoweringReducer, v8::internal::compiler::turboshaft::MachineLoweringReducer, v8::internal::compiler::turboshaft::FastApiCallLoweringReducer, v8::internal::compiler::turboshaft::SelectLoweringReducer, v8::internal::compiler::turboshaft::MachineOptimizationReducer, v8::internal::compiler::turboshaft::TSReducerBase> >::LoadFieldImpl<v8::internal::compiler::turboshaft::Any>(v8::internal::compiler::turboshaft::OpIndex, v8::internal::compiler::FieldAccess const&) [claude]
 5: 0x2eee6f5 v8::internal::compiler::turboshaft::MachineLoweringReducer<v8::internal::compiler::turboshaft::ReducerStack<v8::internal::compiler::turboshaft::Assembler<v8::internal::compiler::turboshaft::reducer_list<v8::internal::compiler::turboshaft::TurboshaftAssemblerOpInterface, v8::internal::compiler::turboshaft::GraphVisitor, v8::internal::compiler::turboshaft::JSGenericLoweringReducer, v8::internal::compiler::turboshaft::DataViewLoweringReducer, v8::internal::compiler::turboshaft::MachineLoweringReducer, v8::internal::compiler::turboshaft::FastApiCallLoweringReducer, v8::internal::compiler::turboshaft::SelectLoweringReducer, v8::internal::compiler::turboshaft::MachineOptimizationReducer, v8::internal::compiler::turboshaft::TSReducerBase> >, false, v8::internal::compiler::turboshaft::FastApiCallLoweringReducer, v8::internal::compiler::turboshaft::SelectLoweringReducer, v8::internal::compiler::turboshaft::MachineOptimizationReducer, v8::internal::compiler::turboshaft::TSReducerBase> >::ReduceStringAt(v8::internal::compiler::turboshaft::V<v8::internal::String>, v8::internal::compiler::turboshaft::V<v8::internal::compiler::turboshaft::WordWithBits<64ul> >, v8::internal::compiler::turboshaft::StringAtOp::Kind) [claude]
 6: 0x2ef8d7f v8::internal::compiler::turboshaft::OpIndex v8::internal::compiler::turboshaft::GraphVisitor<v8::internal::compiler::turboshaft::ReducerStack<v8::internal::compiler::turboshaft::Assembler<v8::internal::compiler::turboshaft::reducer_list<v8::internal::compiler::turboshaft::TurboshaftAssemblerOpInterface, v8::internal::compiler::turboshaft::GraphVisitor, v8::internal::compiler::turboshaft::JSGenericLoweringReducer, v8::internal::compiler::turboshaft::DataViewLoweringReducer, v8::internal::compiler::turboshaft::MachineLoweringReducer, v8::internal::compiler::turboshaft::FastApiCallLoweringReducer, v8::internal::compiler::turboshaft::SelectLoweringReducer, v8::internal::compiler::turboshaft::MachineOptimizationReducer, v8::internal::compiler::turboshaft::TSReducerBase> >, false, v8::internal::compiler::turboshaft::JSGenericLoweringReducer, v8::internal::compiler::turboshaft::DataViewLoweringReducer, v8::internal::compiler::turboshaft::MachineLoweringReducer, v8::internal::compiler::turboshaft::FastApiCallLoweringReducer, v8::internal::compiler::turboshaft::SelectLoweringReducer, v8::internal::compiler::turboshaft::MachineOptimizationReducer, v8::internal::compiler::turboshaft::TSReducerBase> >::VisitOpNoMappingUpdate<false>(v8::internal::compiler::turboshaft::OpIndex, v8::internal::compiler::turboshaft::Block const*) [claude]
 7: 0x2efa9ac void v8::internal::compiler::turboshaft::GraphVisitor<v8::internal::compiler::turboshaft::ReducerStack<v8::internal::compiler::turboshaft::Assembler<v8::internal::compiler::turboshaft::reducer_list<v8::internal::compiler::turboshaft::TurboshaftAssemblerOpInterface, v8::internal::compiler::turboshaft::GraphVisitor, v8::internal::compiler::turboshaft::JSGenericLoweringReducer, v8::internal::compiler::turboshaft::DataViewLoweringReducer, v8::internal::compiler::turboshaft::MachineLoweringReducer, v8::internal::compiler::turboshaft::FastApiCallLoweringReducer, v8::internal::compiler::turboshaft::SelectLoweringReducer, v8::internal::compiler::turboshaft::MachineOptimizationReducer, v8::internal::compiler::turboshaft::TSReducerBase> >, false, v8::internal::compiler::turboshaft::JSGenericLoweringReducer, v8::internal::compiler::turboshaft::DataViewLoweringReducer, v8::internal::compiler::turboshaft::MachineLoweringReducer, v8::internal::compiler::turboshaft::FastApiCallLoweringReducer, v8::internal::compiler::turboshaft::SelectLoweringReducer, v8::internal::compiler::turboshaft::MachineOptimizationReducer, v8::internal::compiler::turboshaft::TSReducerBase> >::VisitAllBlocks<false>() [claude]
 8: 0x2efc9ca  [claude]
 9: 0x2997274 auto v8::internal::compiler::PipelineImpl::Run<v8::internal::compiler::turboshaft::MachineLoweringPhase>() [claude]
10: 0x29ae081 v8::internal::compiler::PipelineImpl::OptimizeGraph(v8::internal::compiler::Linkage*) [claude]
11: 0x29afae0 v8::internal::compiler::PipelineCompilationJob::ExecuteJobImpl(v8::internal::RuntimeCallStats*, v8::internal::LocalIsolate*) [claude]
12: 0x127e33b v8::internal::OptimizedCompilationJob::ExecuteJob(v8::internal::RuntimeCallStats*, v8::internal::LocalIsolate*) [claude]
13: 0x12bd671 v8::internal::OptimizingCompileDispatcher::CompileNext(v8::internal::TurbofanCompilationJob*, v8::internal::LocalIsolate*) [claude]
14: 0x12bda0f v8::internal::OptimizingCompileDispatcher::CompileTask::Run(v8::JobDelegate*) [claude]
15: 0x21bf548 v8::platform::DefaultJobWorker::Run() [claude]
16: 0xff73d4  [claude]
17: 0x7fab8ef52aa4  [/lib/x86_64-linux-gnu/libc.so.6]
18: 0x7fab8efdfc3c  [/lib/x86_64-linux-gnu/libc.so.6]
Illegal instruction

Analysis

The crash occurs in the V8 JavaScript engine's Turboshaft compiler during string operation optimization. The specific failure point is in the MachineLoweringReducer::ReduceStringAt method when it reaches an unreachable code path.

Priority

Critical - This bug prevents normal usage of Claude Code and causes complete application crash during basic text input operations.

View original on GitHub ↗

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