[BUG] Temporary files (.tmp.*) not cleaned up in project directory
Resolved 💬 3 comments Opened Feb 10, 2026 by rstar327 Closed Mar 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?
Current Behavior
Claude Code creates temporary files but does not remove them after operations complete.
[filename].tmp.[timestamp]
What Should Happen?
- Temporary
.tmp.*files in the project directory should be removed immediately after the file operation completes - If cleanup fails, at minimum these patterns should be added to a suggested
.gitignore: .tmp.
Error Messages/Logs
Steps to Reproduce
Steps To Reproduce
- Run Claude Code in a project directory
- Perform file editing operations
- Complete or exit the session
- Check the project directory for leftover files
Claude Model
Opus
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
2.1.38
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
Windows Terminal
Additional Information
_No response_
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗