Segfault crash on Windows: Bun v1.3.5 segmentation fault during long-running agent task
Resolved 💬 3 comments Opened Jan 29, 2026 by cjsimon2 Closed Feb 1, 2026
Bug Report
Environment
- Claude Code version: 2.1.23
- Bun version (bundled): 1.3.5 (1e86cebd)
- OS: Windows 11 x64 (baseline)
- CPU features: sse42 avx avx2
- Machine RAM: 34.27GB
Description
Claude Code crashes with a segmentation fault during a long-running agent task (Explore subagent with Sonnet). The crash occurs after ~97 seconds of execution with RSS at 0.89GB (peak 1.07GB).
Crash Details
Bun v1.3.5 (1e86cebd) Windows x64 (baseline)
Windows v.win11_dt
CPU: sse42 avx avx2
Args: "C:\Users\casey\.local\bin\claude.exe" "--dangerously-skip-permissions"
Features: Bun.stderr(2) Bun.stdin(2) Bun.stdout(2) abort_signal(14) fetch(627) jsc spawn(758) standalone_executable process_dlopen
Builtins: "bun:main" "node:assert" "node:async_hooks" "node:buffer" "node:child_process" "node:constants" "node:crypto" "node:domain" "node:events" "node:fs" "node:fs/promises" "node:http" "node:https" "node:module" "node:net" "node:os" "node:path" "node:path/posix" "node:path/win32" "node:perf_hooks" "node:process" "node:querystring" "node:stream" "node:timers/promises" "node:tls" "node:tty" "node:url" "node:util" "node:zlib" "node:worker_threads" "undici" "ws" "node-fetch" "node:inspector" "node:http2" "node:diagnostics_channel"
Elapsed: 97223ms | User: 14546ms | Sys: 5828ms
RSS: 0.89GB | Peak: 1.07GB | Commit: 1.10GB | Faults: 610048 | Machine: 34.27GB
panic(main thread): Segmentation fault at address 0xFFFFFFFFFFFFFFFF
Bun Crash Report Link
Steps to Reproduce
- Run Claude Code on Windows 11 with
--dangerously-skip-permissions - Trigger a long-running agent task (e.g., an Explore subagent using Sonnet that performs 50+ tool uses)
- After ~90-100 seconds and ~1GB memory usage, the process crashes with a segfault
Expected Behavior
Claude Code should complete the agent task without crashing.
Additional Context
- The crash address
0xFFFFFFFFFFFFFFFF(-1) suggests a null/invalid pointer dereference - The task involved an Explore subagent (Sonnet 4.5) performing 50+ tool uses including file reads and bash commands
- Memory usage peaked at 1.07GB which is within reasonable bounds
- Bun 1.3.7 is the latest release and may contain fixes for this issue — consider bumping the bundled Bun version
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗