[BUG] Bun Bus error crash regression on macOS Silicon (0xBAD4007) — persists in CC 2.1.126 / Bun 1.3.14
Description
This is a regression / re-report of #41603 (closed). The same Bun Bus error crash (0xBAD4007) is still occurring on macOS Silicon, now on Claude Code 2.1.126 with Bun 1.3.14. The previous report was on CC 2.1.87 / Bun 1.3.11 — the bug was not fixed, it regressed or was never fully resolved.
This time the crash happened after a long session (~1h45m elapsed, 21m active) rather than early in the session (90s in the original report), suggesting this may be a broader memory corruption issue that manifests under different conditions.
Environment
- Claude Code version: 2.1.126
- Bun version (bundled): 1.3.14 (0a466a11)
- OS: macOS 26.4.1 (Darwin 25.4.0)
- Platform: macOS Silicon (Apple M4 Pro)
- RAM: 48GB
Crash Details
Bun v1.3.14 (0a466a11) macOS Silicon
Args: "claude" "--dangerously-skip-permissions" "--thinking-display" "summarized"
Features: Bun.stderr(2) Bun.stdin(2) Bun.stdout(2) WebSocket abort_signal(15) fetch(330) jsc spawn(7417) standalone_executable process_dlopen yaml_parse(330) claude_code
Builtins: "bun:main" "node:assert" "node:async_hooks" "node:buffer" "node:child_process" "node:constants" "node:crypto" "node:dns" "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:readline" "node:stream" "node:stream/consumers" "node:string_decoder" "node:timers/promises" "node:tls" "node:tty" "node:url" "node:util" "node:vm" "node:zlib" "ws" "node:http2"
Elapsed: 6332756ms | User: 209638ms | Sys: 31838ms
RSS: 0.51GB | Peak: 0.80GB | Commit: 0.02ZB | Faults: 254 | Machine: 51.54GB
panic(main thread): Bus error at address 0xBAD4007
oh no: Bun has crashed. This indicates a bug in Bun, not your code.
Bun Crash Report Link
Key Differences from Original Report (#41603)
| | Original (#41603) | This report |
|---|---|---|
| CC version | 2.1.87 | 2.1.126 |
| Bun version | 1.3.11 | 1.3.14 |
| macOS | 26.3 | 26.4.1 |
| Session elapsed | ~90s | ~1h45m (6332s) |
| RSS at crash | 0.89GB | 0.51GB |
| Peak RSS | 0.89GB | 0.80GB |
| Trigger | Image paste (chat:imagePaste) | Long session (unclear specific trigger) |
| Spawned processes | 28 | 7417 |
| Fetch calls | 14 | 330 |
Notes
- The crash address
0xBAD4007is identical to the original report, strongly suggesting the same underlying bug - This session was much more active: 7,417 spawned processes vs 28, and 330 fetch calls vs 14
- RSS was actually lower at crash (0.51GB vs 0.89GB), so this isn't a simple OOM situation
- The
Commit: 0.02ZBvalue looks like a memory accounting overflow/corruption itself - The
claude_codefeature flag is now listed in Features (wasn't in the original), suggesting Bun's claude_code-specific code paths may be involved - The WebSocket feature is also new compared to the original crash
Expected Behavior
Claude Code should not crash with a Bun Bus error. Long sessions should either remain stable or gracefully handle memory pressure.
Previous Report
#41603 — closed without resolution. This is the same crash signature recurring across multiple CC and Bun versions, indicating a persistent upstream issue that needs to be tracked.
3 Comments
Additional Context: Previously Fixed, Then Regressed
This was fixed in v2.1.97, most likely by this change:
The original report (#41603) was on CC 2.1.87 (pre-fix). The fix in 2.1.97 resolved it. The crash is now back on 2.1.126, meaning the fix regressed somewhere between 2.1.97 and 2.1.126.
This narrows the regression window and suggests the image compression/token budget path was either reverted, bypassed under certain conditions (e.g., long sessions with many spawned processes), or a parallel code path reintroduced the uncompressed buffer handling that triggers the Bus error.
Found 3 possible duplicate issues:
This issue will be automatically closed as a duplicate in 3 days.
🤖 Generated with Claude Code
This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.