Temporary files (tmpclaude-*-cwd) created in project root instead of temp directory
Resolved 💬 2 comments Opened Jan 14, 2026 by AerisI Closed Feb 26, 2026
Description
Claude Code is creating temporary files named tmpclaude-*-cwd in the project's root directory instead of using a proper temporary directory.
Files created
tmpclaude-0654-cwd
tmpclaude-35c3-cwd
tmpclaude-4916-cwd
tmpclaude-5f4c-cwd
tmpclaude-c39e-cwd
tmpclaude-e7bc-cwd
tmpclaude-f3e9-cwd
tmpclaude-f4d0-cwd
Expected behavior
These temporary files should be created in:
- The system's temp directory (
%TEMP%on Windows,/tmpon Unix) - Or the Claude Code scratchpad directory that's already configured
Actual behavior
Files are created directly in the user's project root directory, which:
- Clutters the project workspace
- Can accidentally be committed to git if not added to
.gitignore - Is visible in the IDE file explorer
Environment
- OS: Windows 11
- Claude Code version: Latest (as of January 2025)
Workaround
Adding tmpclaude-* to .gitignore prevents them from being committed, but they still appear in the project root.
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗