claude-code - 💡(How to fix) Fix Bun 1.3.14 integer overflow panic on Windows x64 after long-running session (low memory) - claude 2.1.145

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

The native Windows claude.exe crashes with a Bun panic: integer overflow after a long-running session (~13h42m elapsed). The bundled Bun runtime panics, which kills the whole CLI process and the active session at once.

Two points that distinguish this from the existing reports:

  1. It is not memory-related: RSS 0.43GB on a 64GB machine. Unlike the earlier startup/high-memory reports (#20322, #22233 had ~6GB RSS), the trigger here appears to be session longevity, not memory pressure.
  2. The integer overflow panic still reproduces on the newer Bun 1.3.14 — prior integer-overflow reports were all on Bun 1.3.5.

Root Cause

Long-session / hook-related Windows Bun crashes:

  • #21875 (root cause: N-API async cleanup race + JSC GC use-after-free; hooks contributing)
  • #60363 (Windows: crash when a hook fires frequently in long sessions)
  • #22632 (Bun crash after extended session)

Code Example

Bun v1.3.14 (521eedd6) Windows x64 (baseline)
Elapsed: 49342754ms | User: 517359ms | Sys: 162437ms
RSS: 0.43GB | Peak: 0.55GB | Commit: 1.22GB | Faults: 2468735 | Machine: 66.20GB

panic(thread 46332): integer overflow
oh no: Bun has crashed. This indicates a bug in Bun, not your code.
RAW_BUFFERClick to expand / collapse

Summary

The native Windows claude.exe crashes with a Bun panic: integer overflow after a long-running session (~13h42m elapsed). The bundled Bun runtime panics, which kills the whole CLI process and the active session at once.

Two points that distinguish this from the existing reports:

  1. It is not memory-related: RSS 0.43GB on a 64GB machine. Unlike the earlier startup/high-memory reports (#20322, #22233 had ~6GB RSS), the trigger here appears to be session longevity, not memory pressure.
  2. The integer overflow panic still reproduces on the newer Bun 1.3.14 — prior integer-overflow reports were all on Bun 1.3.5.

Environment

  • Claude Code: 2.1.145 (latest at time of report)
  • Bundled Bun: 1.3.14 (521eedd6) Windows x64 (baseline)
  • OS: Windows 11 Pro 10.0.26200
  • CPU: sse42 avx avx2 avx512
  • Launched with: --model opus[1m] --dangerously-skip-permissions

Crash output

Bun v1.3.14 (521eedd6) Windows x64 (baseline)
Elapsed: 49342754ms | User: 517359ms | Sys: 162437ms
RSS: 0.43GB | Peak: 0.55GB | Commit: 1.22GB | Faults: 2468735 | Machine: 66.20GB

panic(thread 46332): integer overflow
oh no: Bun has crashed. This indicates a bug in Bun, not your code.

A bun.report crash dump was auto-generated at crash time.

Possible contributing factor: frequent hook subprocesses

This session had 4 PreToolUse hook matchers (Bash, Read, Glob, Grep) each spawning a subprocess on every tool call — i.e. very frequently over ~13h. This echoes #21875 ("hooks are a contributing factor") and #60363 (crash when a hook fires frequently in long sessions). The crash mechanism may be in Bun's subprocess/spawn handling accumulating over a long-lived process.

Related / possibly duplicate

Integer-overflow family (all on Bun 1.3.5):

  • #20322, #18567, #22233, #20674

Long-session / hook-related Windows Bun crashes:

  • #21875 (root cause: N-API async cleanup race + JSC GC use-after-free; hooks contributing)
  • #60363 (Windows: crash when a hook fires frequently in long sessions)
  • #22632 (Bun crash after extended session)

New data point: the integer-overflow panic still reproduces on Bun 1.3.14 with a long-running, low-memory trigger on Windows x64 (baseline build).

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING