-
Notifications
You must be signed in to change notification settings - Fork 7.1k
Open
Labels
area:packagingbugSomething isn't workingSomething isn't workinghas reproHas detailed reproduction stepsHas detailed reproduction stepsperf:memoryplatform:windowsIssue specifically occurs on WindowsIssue specifically occurs on Windows
Description
Description
The native Windows binary (claude.exe) extracts native Node.js addon files to the system temp directory on each session/invocation but never cleans them up. Over time this accumulates significant disk usage.
Environment
- OS: Windows 11
- Claude Code version: Native binary (
.local/bin/claude.exe, ~232 MB) - Installation method: Native binary (not npm)
- Auto-update: Disabled
Evidence
After ~4 days of regular usage:
- 2,813 files matching pattern
.789*.node - 18 GB total disk usage
- Each file is exactly 6,965,760 bytes (~6.7 MB)
- Files are created in
C:\Users\<user>\AppData\Local\Temp\ - Naming pattern:
.789127d3????????-00000000.node(hash varies per session)
$ find /c/Users/slono/AppData/Local/Temp -name ".789*.node" -type f | wc -l
2813
$ du -ch /c/Users/slono/AppData/Local/Temp/.789*.node | tail -1
18G total
$ ls -la /c/Users/slono/AppData/Local/Temp/.789*.node | head -5
-rwxr-xr-x 1 slono 197609 6965760 Jan 31 22:34 .789127d317febb4e-00000000.node
-rwxr-xr-x 1 slono 197609 6965760 Jan 31 22:52 .789127d31aef7f3e-00000000.node
-rwxr-xr-x 1 slono 197609 6965760 Jan 31 22:39 .789127d31eeffeae-00000000.node
...
The files are Windows PE64 DLLs (native Node.js addons) - identical content, just different filenames per session.
Expected Behavior
The application should either:
- Reuse existing extracted native modules instead of creating new copies each session
- Clean up extracted temp files on exit
- Use a deterministic filename so subsequent runs reuse the same file
Workaround
Manual cleanup:
Remove-Item "C:\Users\<user>\AppData\Local\Temp\.789*.node" -ForceFiles can be safely deleted when Claude Code is not running.
Impact
At ~7 MB per session, heavy users can accumulate tens of GB within days. This is especially problematic on systems with smaller SSDs or limited C: drive space.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area:packagingbugSomething isn't workingSomething isn't workinghas reproHas detailed reproduction stepsHas detailed reproduction stepsperf:memoryplatform:windowsIssue specifically occurs on WindowsIssue specifically occurs on Windows