[BUG] tmpclaude-*-cwd files created in project directory on Windows MINGW64

Resolved 💬 5 comments Opened Jan 12, 2026 by unalnaip Closed Feb 26, 2026

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?

Environment:

  • Claude Code: 2.1.5
  • OS: Windows 11 (NT-10.0-26100)
  • Shell: MINGW64 Git Bash 5.2.37 (x86_64-pc-msys)
  • Node.js: v24.12.0
  • MSYSTEM: MINGW64

Issue: Temporary cwd tracking files (tmpclaude-XXXX-cwd) are created
in the working directory instead of the temp folder.

Expected: Files should go to %LOCALAPPDATA%\Temp\claude\
Actual: Files created in project root and subdirectories

What Should Happen?

Expected: Files should go to %LOCALAPPDATA%\Temp\claude\
Actual: Files created in project root and subdirectories

Error Messages/Logs

Steps to Reproduce

Diagnosis Complete:
┌─────────────┬───────────────────────────────┐
│ Component │ Value │
├─────────────┼───────────────────────────────┤
│ Claude Code │ v2.1.5 │
├─────────────┼───────────────────────────────┤
│ Shell │ MINGW64 (Git Bash) │
├─────────────┼───────────────────────────────┤
│ Bash │ 5.2.37 (x86_64-pc-msys) │
├─────────────┼───────────────────────────────┤
│ Node.js │ v24.12.0 │
├─────────────┼───────────────────────────────┤
│ OS │ Windows 10/11 (NT-10.0-26100) │
├─────────────┼───────────────────────────────┤
│ MSYSTEM │ MINGW64 │
└─────────────┴───────────────────────────────┘
Root Cause:
Claude Code's bash tool creates tmpclaude-XXXX-cwd files to verify/track the current working directory. On MINGW64/Git Bash, there's a path resolution issue where these files are created in the project directory instead of the proper temp location

This is likely a Claude Code bug specific to MINGW64 - the temp path handling doesn't correctly translate between Windows paths and MSYS2/Unix-style paths.

Claude Model

Opus

Is this a regression?

Yes, this worked in a previous version

Last Working Version

_No response_

Claude Code Version

v2.1.5

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

Other

Additional Information

_No response_

View original on GitHub ↗

This issue has 5 comments on GitHub. Read the full discussion on GitHub ↗