Description
Claude Code creates temporary files with pattern tmpclaude-*-cwd in the user's project working directory instead of the designated scratchpad directory.
Current Behavior
When running Claude Code, files like tmpclaude-fe6b-cwd, tmpclaude-5204-cwd, etc. are created in:
- Project root directory (e.g.,
d:\Rhema App\)
- Subdirectories where bash commands are executed (e.g.,
d:\Rhema App\functions\)
These files accumulate over time (100+ files in my case) and clutter the project directory.
Expected Behavior
These temporary files should be created in the scratchpad directory that Claude Code already defines:
- Windows:
%TEMP%\claude\{project-hash}\{session-id}\scratchpad\
- Example:
C:\Users\win\AppData\Local\Temp\claude\d--Rhema-App\0e2459b9-3549-4685-b4b1-5e1e8810abdc\scratchpad
Workaround
Currently mitigated by:
- Adding
tmpclaude-*-cwd to .gitignore
- Manually deleting files:
rm -f tmpclaude-*-cwd
Environment
- OS: Windows 11
- Claude Code: Latest version (VSCode extension)
Impact
- Clutters project directory
- Confuses users who see unknown files appearing
- Files not automatically cleaned up between sessions
Description
Claude Code creates temporary files with pattern
tmpclaude-*-cwdin the user's project working directory instead of the designated scratchpad directory.Current Behavior
When running Claude Code, files like
tmpclaude-fe6b-cwd,tmpclaude-5204-cwd, etc. are created in:d:\Rhema App\)d:\Rhema App\functions\)These files accumulate over time (100+ files in my case) and clutter the project directory.
Expected Behavior
These temporary files should be created in the scratchpad directory that Claude Code already defines:
%TEMP%\claude\{project-hash}\{session-id}\scratchpad\C:\Users\win\AppData\Local\Temp\claude\d--Rhema-App\0e2459b9-3549-4685-b4b1-5e1e8810abdc\scratchpadWorkaround
Currently mitigated by:
tmpclaude-*-cwdto.gitignorerm -f tmpclaude-*-cwdEnvironment
Impact