[BUG] Write tool and Bash tool resolve /tmp to different physical locations — files written by one are invisible to the other (Windows)

Resolved 💬 3 comments Opened Mar 9, 2026 by nv186000 Closed Mar 13, 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?

The Write tool and the Bash tool resolve /tmp to different physical locations. A file written to /tmp/file.ps1 by the Write tool cannot be found when the Bash tool tries to execute or read it from the same path.

What Should Happen?

/tmp should resolve to the same physical path across all tools within the same Claude Code session. A file written by the Write tool should be immediately readable and executable by the Bash tool.

Error Messages/Logs

# Write tool says:
File created successfully at: /tmp/write_backlog.ps1

# Bash tool then runs:
powershell.exe -ExecutionPolicy Bypass -File /tmp/write_backlog.ps1

# PowerShell error:
The argument '/tmp/write_backlog.ps1' to the -File parameter does not exist.

# Bash cat also fails:
cat /tmp/write_backlog.ps1
cat: /tmp/write_backlog.ps1: No such file or directory

Steps to Reproduce

Use the Write tool to write any content to /tmp/test.ps1
Confirm the Write tool reports success
In the Bash tool, run cat /tmp/test.ps1
File is not found

Claude Model

Sonnet (default)

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

latest

Platform

Other

Operating System

Windows

Terminal/Shell

Other

Additional Information

Bash's /tmp correctly maps to C:\Users\navee\AppData\Local\Temp\ (confirmed by writing a file there with echo > /tmp/test.txt and finding it at that Windows path). The Write tool's /tmp maps to a different, unidentified location. The two tool contexts do not share the same temp filesystem view, which makes it impossible to use the Write tool to stage scripts for the Bash tool to execute.

View original on GitHub ↗

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