Segfault crash after Windows sleep/wake with active session

Resolved 💬 3 comments Opened Mar 9, 2026 by tradesdontlie Closed Mar 13, 2026

Bug Description

Claude Code crashes with a segmentation fault when resuming a Windows PC from sleep while a Claude Code session is still active. This happens consistently on a new PC.

Crash Report

Crash link: https://bun.report/1.3.11/e_1dea015eGuhogCCYnpggNT64.desy2TCYnpggNT64.desynouE__CYnpggNT64.desws0PCUUSER32.dllgj9vBCYnpggNT64.desgi6RCYnpggNT64.desg76D___CYnpggNT64.desoqmWA2A4D

Bun v1.3.11 (dea015ec) Windows x64 (baseline)
Windows v.win11_dt
CPU: sse42 avx avx2 avx512

panic(thread 36380): Segmentation fault at address 0x3C

Stack involves: ntdll.dll, USER32.dll

RSS: 0.88GB | Peak: 1.03GB | Commit: 1.50GB | Machine: 66.12GB

Steps to Reproduce

  1. Start a Claude Code session on Windows
  2. Leave the session active and let the PC go to sleep
  3. Wake the PC
  4. Claude Code crashes with a segfault

Expected Behavior

Claude Code should gracefully handle the OS sleep/wake cycle — either recovering the session or exiting cleanly.

System Information

| Component | Details |
|-----------|---------|
| Claude Code | v2.1.71 |
| Bun | v1.3.11 (dea015ec) |
| OS | Windows 11 Pro Build 26200 |
| System | Alienware Area-51 AAT2265 |
| CPU | AMD Ryzen 9 9950X3D 16-Core (32 threads) @ 4300 MHz |
| CPU Features | SSE4.2, AVX, AVX2, AVX-512 |
| GPU | NVIDIA GeForce RTX 5090 (driver 32.0.15.8195) |
| iGPU | AMD Radeon Graphics (driver 32.0.21036.18) |
| RAM | 63 GB (44 GB available at time of report) |
| System Type | x64-based PC |

Additional Context

The crash originates in ntdll.dll / USER32.dll, suggesting it's related to broken sockets or IPC handles that become invalid after the OS suspends and resumes. Bun likely doesn't handle the dangling references gracefully on wake.

This is a brand new machine (installed 3/6/2026) and the crash only occurs with Claude Code — no other applications exhibit this behavior.

View original on GitHub ↗

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