[BUG] tmpclaude-*-cwd temp files accumulate in project directory and are not cleaned up
Resolved 💬 3 comments Opened Jan 12, 2026 by chiehwang-max Closed Jan 12, 2026
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
Description:
When using Claude Code, temporary files with the pattern tmpclaude-XXXX-cwd are created in the project root directory. These files persist after bash commands complete and accumulate over time, polluting the project folder.
The files appear to store the current working directory path in Unix format.
What Should Happen?
Temp files should be automatically cleaned up when the bash command completes or when the session ends.
Error Messages/Logs
Steps to Reproduce
- Open Claude Code in a project directory
- Run several bash commands during a session
- Check project root - tmpclaude-* files remain
Claude Model
Opus
Is this a regression?
Yes, this worked in a previous version
Last Working Version
2.1
Claude Code Version
2.1.5
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
VS Code integrated terminal
Additional Information
File contents example:
/d/Fooderland
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗