--- name: tmp-path-windows description: /tmp resolves to different directories in Git Bash vs Write tool on Windows; use .claude/tmp/ instead applies-to: all --- # /tmp Path Mismatch on Windows ## The problem On Windows, `/tmp` resolves to two different real directories depending on which tool accesses it: | Tool | /tmp resolves to | |------|-----------------| | Git Bash / curl | `%LOCALAPPDATA%\Temp\` (e.g., `C:\Users\Howard\AppData\Local\Temp\`) | | Claude Code Write tool | `C:\tmp\` | These are different directories. If you write a file with the Write tool to `/tmp/payload.json` and then read it back with curl in a Bash command, curl reads a stale file from a previous session — or a completely different file. ## Incident that established this rule 2026-05-01: The Write tool created `/tmp/comment_payload.json` in `C:\tmp\`. curl read `/tmp/comment_payload.json` from `%LOCALAPPDATA%\Temp\` — a stale payload from the previous day's Cascades session. The wrong comment (containing Karen Rossini / ALDOCS content) was posted to a Sombra ticket. The comment could not be deleted via the Syncro API. ## The fix: use .claude/tmp/ or heredocs **Option 1 — Heredoc (preferred for JSON payloads):** ```bash curl -s -X POST "${URL}" -H "Content-Type: application/json" --data-binary @- <<'JSON' {"key": "value", "other": "data"} JSON ``` No file involved — no path ambiguity. Use `<<'JSON'` for static content and `<