[MODEL] Please do not put tmp files into working directory, it is very annoying
Status Fixed / completed
Reported on v2.1.5
Maintainer reply None cached
Workaround ✓ Mentioned in thread ↓
Activity 4 comments · opened Jan 13, 2026 · closed Jan 14, 2026
Preflight Checklist
- [x] I have searched existing issues for similar behavior reports
- [x] This report does NOT contain sensitive information (API keys, passwords, etc.)
Type of Behavior Issue
Claude modified files I didn't ask it to modify
What You Asked Claude to Do
Anything that require to scan or read any file
What Claude Actually Did
He did it, but he also created a lot of usles (for me) files
Expected Behavior
put every tmp files into %TEMP% or /tmp
Files Affected
Permission Mode
Accept Edits was ON (auto-accepting changes)
Can You Reproduce This?
Yes, every time with the same prompt
Steps to Reproduce
_No response_
Claude Model
Sonnet
Relevant Conversation
Impact
Critical - Data loss or corrupted project
Claude Code Version
2.1.5 (Claude Code)
Platform
Anthropic API
Additional Context
_No response_
4 Comments
I’m seeing the same behavior on my end and wanted to confirm it’s reproducible.
When using Claude Code, a temporary file is being created in the primary working directory. The contents of this file appear to be the current working directory (
pwd) that Claude Code is operating in.From what I can tell, this temp file seems to be created whenever Claude Code performs a search or find operation across the project. It happens consistently during normal usage and not as part of any explicit file creation on my side.
Observations:
pwdEnvironment:
This matches the behavior described in this issue, so adding a +1 that it’s affecting other users as well.
<img width="946" height="371" alt="Image" src="https://github.com/user-attachments/assets/415e105f-257a-40b5-92d4-4e95ae3c41e9" />
after digging through the issue i can see that this issue is a duplicate of #17568
issue hasn't been fixed so far and the workaround for the time being is :
Added tmpclaude* to .gitignore to prevent them from being tracked.
It was fixed this morning in v2.1.7
Now it's working fine 🙌
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.