[BUG] /heapdump fails with EEXIST on Windows
Resolved 💬 4 comments Opened Mar 10, 2026 by PJW2004 Closed Mar 13, 2026
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
/heapdump command fails on Windows with EEXIST error. The status bar shows "High memory usage (7GB) · /heapdump" suggesting users run the command, but it always fails on Windows regardless of the working directory.
<img width="1100" height="381" alt="Image" src="https://github.com/user-attachments/assets/f6374464-664e-4f62-957d-d23a1969ea90" />
What Should Happen?
/heapdump should either successfully create a heap dump file, or not be surfaced to users if it doesn't work on Windows (e.g., the "High memory usage · /heapdump" suggestion in the status bar should not appear on unsupported platforms).
Error Messages/Logs
Failed to create heap dump: EEXIST: file already exists, mkdir 'C:\Users\{user}\Desktop'
Steps to Reproduce
- Run
claudeon Windows - Run
heapdump - Error is returned immediately (reproducible in any working directory)
Claude Model
Opus
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
2.1.72
Platform
Other
Operating System
Windows
Terminal/Shell
PowerShell
Additional Information
_No response_
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗