Temporary files (tmpclaude-*-cwd) not cleaned up after bash commands
Resolved 💬 4 comments Opened Jan 13, 2026 by ksons Closed Jan 13, 2026
Description
Claude Code creates temporary files named tmpclaude-<hash>-cwd in the working directory when executing bash commands. These files contain the current working directory path and appear to be used for tracking directory state.
The files are not being cleaned up after the bash commands complete, leaving orphaned temp files in the user's project directory.
Steps to Reproduce
- Start a Claude Code session
- Execute several bash commands
- Check the working directory for
tmpclaude-*files
Observed Behavior
Multiple temp files accumulate in the working directory:
-rw-r--r-- 1 user 34 Jan 13 18:46 tmpclaude-0701-cwd
-rw-r--r-- 1 user 34 Jan 13 18:46 tmpclaude-1fab-cwd
-rw-r--r-- 1 user 34 Jan 13 18:56 tmpclaude-3300-cwd
...
Each file contains just the working directory path, e.g.:
/d/repos/my-project
Expected Behavior
Temporary files should be cleaned up after the bash command completes, or stored in a system temp directory rather than the user's project directory.
Environment
- Platform: Windows (MINGW64_NT-10.0)
- Claude Code: Latest version as of 2026-01-13
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗