[Windows] /heapdump fails with EEXIST when output directory already exists

Resolved 💬 3 comments Opened Mar 21, 2026 by dhiben Closed Mar 24, 2026

Environment

  • OS: Windows 11 Pro 10.0.26220
  • Claude Code Version: 2.1.81

Description

Running /heapdump fails on Windows when the target output directory (Desktop) already exists. This makes it impossible to collect heap dumps to diagnose memory issues.

Error Message

Failed to create heap dump: EEXIST: file already exists, mkdir 'C:\Users\Ben\Desktop'

Steps to Reproduce

  1. Open Claude Code on Windows 11
  2. Run /heapdump
  3. Command fails immediately

Expected Behavior

The command should use the existing directory rather than failing when it already exists. Heap dump should be created successfully.

View original on GitHub ↗

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