[BUG] Windows: tmpclaude-*-cwd files created in CWD instead of %TEMP%
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
Temporary tmpclaude-XXXX-cwd files used for working directory tracking are being created in the current working directory.
What Should Happen?
These files should not be created in the CWD as they interfere with git tracking.
Perhaps instead they should be in the system temp folder (%TEMP%) or the .claude directory in %USERPROFILE%
Error Messages/Logs
N/A
Steps to Reproduce
Launch Claude Code from a git repository on Windows Run any bash commands Observe tmpclaude-*-cwd files appearing in the repo root
Claude Model
Opus
Is this a regression?
Yes, this worked in a previous version
Last Working Version
2.1.4
Claude Code Version
2.1.5
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
Windows Terminal
Additional Information
Having same issue.
same issue here on Windows in VSCode using Claude Code v2.1.5
Same....
Yep! Got the same issue, not sure why
I also encountered the same issue. I'm using IDEA 2024.3.7, Claude plugin 0.1.14-beta, and Claude Code CLI 2.1.5
Same here ✋ Running Sonnet model
fix script: https://gist.github.com/Haleclipse/1c35fe7b98fe1b5ea0523eb4d3a10f0b
irm "https://gist.githubusercontent.com/Haleclipse/1c35fe7b98fe1b5ea0523eb4d3a10f0b/raw/apply-claude-code-windows-path-fix-2.1.5.ps1" -OutFile "apply-claude-code-windows-path-fix-2.1.5.ps1"
.\apply-claude-code-windows-path-fix-2.1.5.ps1
or
irm "https://gist.githubusercontent.com/Haleclipse/1c35fe7b98fe1b5ea0523eb4d3a10f0b/raw/apply-claude-code-windows-path-fix-2.1.5.ps1" | iex
Windows same, and I add tmpclaude-* to .gitignore。
same here on windows. it's making claude code unusable for tonight, many manual clean-ups
same here on windows.
Same issue
+1
As I assume the claude team will look at this issue, PLEASE also fix this related tmpdir issue: https://github.com/anthropics/claude-code/issues/15700
I suspect you can fix this by having this env variable set to your tmp although i didn't try it yet export CLAUDE_CODE_TMPDIR=
I suspect you can fix this by having this env variable set to your tmp although i didn't try it yet export CLAUDE_CODE_TMPDIR=
Actually, this is a path conversion issue, not a problem with the path itself.
And I’ve already provided the fix earlier.
Why does it seem like none of you can see it?
It's really sad, I can't even temporarily switch to OpenCode now.
rollback to the older version helps
$ claude install stable
rollback to the older version helps
$ claude install stable
$ claude install stable --force
It's work
fix script: https://gist.github.com/Haleclipse/1c35fe7b98fe1b5ea0523eb4d3a10f0b
irm "https://gist.githubusercontent.com/Haleclipse/1c35fe7b98fe1b5ea0523eb4d3a10f0b/raw/apply-claude-code-windows-path-fix-2.1.5.ps1" -OutFile "apply-claude-code-windows-path-fix-2.1.5.ps1" .\apply-claude-code-windows-path-fix-2.1.5.ps1or
irm "https://gist.githubusercontent.com/Haleclipse/1c35fe7b98fe1b5ea0523eb4d3a10f0b/raw/apply-claude-code-windows-path-fix-2.1.5.ps1" | iex
Didn't work for me it says Claude Code cli.js not found or something
fix script: https://gist.github.com/Haleclipse/1c35fe7b98fe1b5ea0523eb4d3a10f0b
irm "https://gist.githubusercontent.com/Haleclipse/1c35fe7b98fe1b5ea0523eb4d3a10f0b/raw/apply-claude-code-windows-path-fix-2.1.5.ps1" -OutFile "apply-claude-code-windows-path-fix-2.1.5.ps1" .\apply-claude-code-windows-path-fix-2.1.5.ps1or
irm "https://gist.githubusercontent.com/Haleclipse/1c35fe7b98fe1b5ea0523eb4d3a10f0b/raw/apply-claude-code-windows-path-fix-2.1.5.ps1" | iexDidn't work for me it says Claude Code cli.js not found or something
If you’re using the bun version of Claude Code, this won’t work for you. please use the npm package version instead.
If you’re using the npm package version of Claude Code,
you can also adjust the scan path specified at the beginning of the script yourself.