claude-code icon indicating copy to clipboard operation
claude-code copied to clipboard

[Bug] Claude creates temporary files in repository root directory

Open ITAnywhere-Developer opened this issue 10 months ago • 2 comments

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

ITAnywhere-Developer avatar Jan 12 '26 10:01 ITAnywhere-Developer

Found 3 possible duplicate issues:

  1. https://github.com/anthropics/claude-code/issues/17568
  2. https://github.com/anthropics/claude-code/issues/17600
  3. 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

github-actions[bot] avatar Jan 12 '26 10:01 github-actions[bot]

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.

Varietyz avatar Jan 15 '26 00:01 Varietyz

Closing for now — inactive for too long. Please open a new issue if this is still relevant.

github-actions[bot] avatar Feb 27 '26 10:02 github-actions[bot]

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.

github-actions[bot] avatar Mar 08 '26 14:03 github-actions[bot]