[BUG] Windows: .node native addon cache files accumulate in working directory (~100GB/week)
Resolved 💬 3 comments Opened Jan 31, 2026 by lionglan624-blip Closed Feb 3, 2026
Description
Claude Code is creating .node native addon cache files in the working directory that are never cleaned up. These files accumulate rapidly, consuming ~100GB of disk space per week of normal usage.
Environment
- OS: Windows 11 (Git Bash / MSYS2)
- Claude Code version: 2.1.27 (issue started around v2.1.17-v2.1.19)
- Working directory:
D:\_temp\user
Files
The files follow this naming pattern:
.789d7ff3ba6e7b0e-00000000.node(hidden files, ~7MB each)24ea8bd7-f3f2-4885-8550-924d329e7804.tmp.node(~876KB each)
$ file D:/_temp/user/.789d7ff3ba6e7b0e-00000000.node
PE32+ executable for MS Windows 6.00 (DLL), x86-64, 7 sections
These appear to be better-sqlite3 native addons extracted by Bun at runtime (as noted in #14911).
Observed Behavior
- ~15,680
.nodefiles accumulated over ~7 days - Total disk usage: ~103GB
- New files are created during active sessions (observed ~14 files created within minutes)
- Files are NOT cleaned up when sessions end
- Files persist across Claude Code restarts
Timeline
- First observed file date: January 24, 2026
- This coincides with v2.1.17 (Jan 22) which included "Fixed crashes on processors without AVX instruction support" - possibly related to native module build/load changes
Steps to Reproduce
- Run Claude Code on Windows with a custom working directory
- Use Claude Code normally for several days
- Check working directory for
.*.nodefiles
ls -la D:/_temp/user/.*.node | wc -l
# Returns thousands of files
Expected Behavior
- Native addon cache files should be cleaned up when no longer needed
- Or, cache should be reused instead of creating new files for each session/operation
- Or, files should be created in a proper temp directory that gets cleaned up
Workaround
Manual cleanup:
rm D:/_temp/user/.*.node
Or scheduled task to periodically delete these files.
Related Issues
- #14911 - macOS Gatekeeper warning for extracted .node native addon (identifies the file origin)
- #18711 - Windows: tmpclaude-*-cwd temp files not being cleaned up (similar cleanup issue)
Additional Context
This is on a project with custom agents (27) and hooks, but the hooks only invoke PowerShell scripts and don't directly use Node.js. The accumulation rate suggests this is related to subagent spawning or general Claude Code operation rather than project-specific configuration.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗