Native .node addon temp files pollute system TEMP root directory
Resolved 💬 2 comments Opened Mar 9, 2026 by DevDengChao Closed Mar 9, 2026
Problem
Claude Code extracts its native N-API addon files (.node DLLs) directly into the system's TEMP root directory (%TEMP% on Windows, e.g. C:\Users\<user>\AppData\Local\Temp\). Each session creates new copies with randomized hex filenames like:
.789377fb93ff3e9e-00000000.node (6.9 MB - ripgrep addon)
.7cde8ffa6f77d76d-00000000.node (3.6 MB - glob/bat addon)
These files accumulate over time and are never cleaned up. On my machine, 2,984 .node files (totaling ~18 GB) have piled up in the TEMP root:
| Size | Count | Content |
|------|-------|---------|
| 6.9 MB | 2,816 | ripgrep N-API addon (grep_cli, regex-automata, aho-corasick) |
| 3.6 MB | 131 | glob/bat/diff addon (globset, bat, similar) |
| 1.2 MB | 14 | other addon |
| 0.6 MB | 23 | other addon |
Expected Behavior
These temporary native addons should be:
- Stored in a dedicated subdirectory (e.g.
%TEMP%/claude-code/or~/.claude/native/) instead of being scattered in the TEMP root - Reused across sessions when the binary content hasn't changed, rather than extracting a new copy every time
- Cleaned up when a session ends, or at least periodically pruned
Environment
- OS: Windows 11 Pro
- Claude Code: latest (as of 2026-03-09)
Impact
- Wastes significant disk space (~18 GB in my case)
- Pollutes the TEMP directory making it harder to manage
- May confuse users or system administrators who see thousands of unknown
.nodeDLLs
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗