-
Notifications
You must be signed in to change notification settings - Fork 17.8k
Auto-updater memory leak crashed 12-hour session (v2.1.76) — 13.81 GB committed, Bun panic #35171
Description
Summary
Claude Code v2.1.76 crashed overnight with a Bun panic ("Illegal instruction") after accumulating 13.81 GB of committed memory during a 12-hour session. The crash appears related to the auto-updater memory leak that was fixed in v2.1.77:
"Fixed auto-updater starting overlapping binary downloads when the slash-command overlay repeatedly opened and closed, accumulating tens of gigabytes of memory"
Crash Details
Bun v1.3.11 (a2743b6d) Windows x64 (baseline)
Elapsed: 44576556ms (~12.4 hours)
RSS: 2.58GB
Peak: 2.58GB
Commit: 13.81GB ← auto-updater leak
Faults: 27235766 ← 27M page faults
Machine: 42.62GB RAM
panic(thread 76628): Illegal instruction at address 0x7FF641918940
Crash report: bun.report/1.3.11/e_1a2743b6mgkgE+hogCg0ku4C6gst6Bw+ps4Cqutt6Birwt6B+57s6B4kz+6Bwnpm0C0rln0Ds0w2rDy25urD2glrrDsvtmrDqkomrD667k8Cum0k8Cyxi61Cgi0i0Cgwk70Cyk8z
What Happened
- Started a Claude Code session on v2.1.76 in the evening
- Left it running overnight (agentic task in progress)
- After ~12 hours, Bun crashed with "Illegal instruction" — session lost
- Memory had grown to 13.81 GB committed (on a machine with 42 GB RAM)
Root Cause
The v2.1.77 changelog confirms this was a known bug:
- Auto-updater started overlapping binary downloads when the slash-command overlay opened/closed
- Downloads accumulated in memory, growing to tens of gigabytes
- Eventually Bun ran out of addressable memory and hit an illegal instruction
Trigger
We had just removed CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC from settings to enable the 1M context window (which requires this traffic to be enabled — see #34143). This also re-enabled the auto-updater, which triggered the memory leak.
Users are forced to choose between:
- 1M context (requires traffic enabled) → auto-updater leak crashes sessions
- Stability (disable traffic) → stuck at 200K context
Environment
- Claude Code: v2.1.76 (now auto-updated to v2.1.77)
- OS: Windows 10 Home 10.0.19045
- Model: Opus 4.6 with 1M context
- Plan: Claude Max
- RAM: 40 GB
Impact
- 12 hours of agentic work lost — session cannot be recovered after Bun crash
- No warning before crash — memory grew silently in the background
- The auto-updater should not be downloading anything during an active session
Suggestion
Even with the v2.1.77 fix for overlapping downloads, the auto-updater should:
- Never download during an active session — wait for idle or session end
- Have a memory budget — abort if download memory exceeds a threshold
- Not be coupled with 1M context —
CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFICshould only disable telemetry, not block context window features
Related: #33949 (root cause analysis of streaming hangs), #34143 (1M context not working with traffic disabled)