[Bug] Claude creates temporary files in repository root directory
Bug Description Claude keeps creating tmpclaude files in the root of the repository
Environment Info
- Platform: win32
- Terminal: IntelliJ built-in
- Feedback ID: 69b5cd36-409b-4247-a474-dca87df6f7aa
Found 3 possible duplicate issues:
- https://github.com/anthropics/claude-code/issues/17568
- https://github.com/anthropics/claude-code/issues/17600
- https://github.com/anthropics/claude-code/issues/17636
This issue will be automatically closed as a duplicate in 3 days.
- If your issue is a duplicate, please close it and 👍 the existing issue instead
- To prevent auto-closure, add a comment or 👎 this comment
🤖 Generated with Claude Code
Temporary Workaround: Automated Cleanup
I've created an automated solution that cleans up these temp files automatically: tmpclaude-auto-cleanup
Quick Setup (30 seconds)
Just copy the prompt from CLAUDE_PROMPT.md and paste it into Claude Code. Claude will configure everything automatically.
What It Does
- ✅ Session Start Cleanup: Runs automatically when you start Claude Code
- ✅ On-Save Cleanup: (Optional) Runs on every file save in VSCode
- ✅ Cross-Platform: Works on Linux, macOS, Windows
- ✅ Git Ignore: Prevents temp files from showing in
git status
Manual Setup
Full instructions and manual configuration files available in the repo.
Note: This is a workaround until the core issue is fixed in Claude Code CLI. The real bug still needs to be addressed by Anthropic.
Closing for now — inactive for too long. Please open a new issue if this is still relevant.
This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.