Bug: tmpclaude-*-cwd temp files accumulate in project root (Windows)
Resolved 💬 4 comments Opened Jan 12, 2026 by rubrical-worker Closed Jan 12, 2026
Description
Claude Code is creating temporary files named tmpclaude-{hash}-cwd in the project root directory. These files are not being cleaned up when shell sessions end, causing them to accumulate.
Files Created
tmpclaude-a78a-cwd
tmpclaude-72cc-cwd
tmpclaude-2fe9-cwd
tmpclaude-db54-cwd
Each file contains only the current working directory path (e.g., /e/Projects/idpf-praxis).
Steps to Reproduce
- Open Claude Code on Windows
- Claude will run several Bash commands during a session
- Check the project root directory for
tmpclaude-*files
Expected Behavior
- Temporary files should be cleaned up when the shell session ends, OR
- Temporary files should be created in a system temp directory (e.g.,
$TEMPor/tmp), not the project root
Actual Behavior
- Multiple
tmpclaude-{hash}-cwdfiles accumulate in the project root - Files persist after the session ends
- Files appear as untracked in
git status
Environment
- OS: Windows 10/11
- Shell: Git Bash
- Claude Code Version: Latest (as of January 12, 2026)
Workaround
Add tmpclaude-* to .gitignore to prevent git status clutter:
echo "tmpclaude-*" >> .gitignore
Suggested Fix
- Create these files in a system temp directory instead of the project root
- Implement cleanup logic when shell sessions terminate
- Use a single file per Claude Code instance rather than per-subprocess
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗