C:/Program Files/Git/heapdump fails with EEXIST when Desktop directory already exists
Resolved 💬 3 comments Opened Mar 15, 2026 by Lylie87 Closed Mar 18, 2026
Description
Running /heapdump fails with the following error:
Failed to create heap dump: EEXIST: file already exists, mkdir 'C:\Users\alexl\Desktop'
Steps to Reproduce
- Have a standard Windows 11 setup where
C:\Users\<username>\Desktopalready exists (as it always does) - Run
/heapdumpin Claude Code
Expected Behaviour
The heapdump should be created successfully, writing the file to the Desktop (or another output directory).
Actual Behaviour
The command fails because it attempts to create the Desktop directory using mkdir without the recursive flag (or equivalent { recursive: true } option in Node's fs.mkdir). Since the directory already exists, it throws EEXIST.
Environment
- OS: Windows 11 Pro 10.0.26200
- Shell: bash
- Platform: win32
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗