Session log: Syncro billing batch (Sombra, Mineralogical Record, Cascades Entra) + /tmp path mismatch incident

Three tickets billed today: #32225 Sombra ($525 onsite), #32229 Mineralogical
Record ($262.50 emergency), #32214 Cascades Entra (33.5 hrs project labor at $0
debits prepaid block). Hit a real incident on Sombra: rogue comment posted with
content from a different ticket because /tmp resolves differently in the Write
tool (C:/tmp/) vs Git Bash (%LOCALAPPDATA%/Temp/) on Windows. Howard manually
deleted from GUI; subsequent posts used heredoc to avoid the file handoff
entirely. Root cause documented in feedback_tmp_path_windows.md so future
sessions don't trip the same wire. Scheduled remote agent
trig_01CAfvwoQ4nLcKEqbU4UQmSa to update the syncro skill examples 2026-05-02.
This commit is contained in:
2026-05-01 10:43:25 -07:00
parent f2c17c59ec
commit dc2ffbdd28
3 changed files with 185 additions and 0 deletions

View File

@@ -29,6 +29,7 @@
- [Syncro Emergency Billing](feedback_syncro_emergency_billing.md) — Emergency = 1.5× multiplier, not additive. Branch by `customer.prepay_hours`: no-prepaid → `26184` at actual hrs; prepaid → `26118` at hrs×1.5. Never stack. Always set `price_retail`.
- [Identity precedence](feedback_identity_precedence.md) — Trust `.claude/identity.json` over the system-reminder `userEmail` hint when they disagree (shared-login machines).
- [1Password — always use service token](feedback_1password_service_token.md) — Source OP_SERVICE_ACCOUNT_TOKEN from SOPS for every `op` call. Desktop-app integration prompts are unacceptable in agent flows.
- [/tmp path mismatch on Windows](feedback_tmp_path_windows.md) — Write tool and Git Bash resolve `/tmp` to DIFFERENT real dirs. Use heredoc or workspace path for JSON payloads handed to curl. Caused wrong-comment incident on Syncro #32225.
## Machine
- [ACG-5070 Workstation Setup](reference_workstation_setup.md) - Windows 11 Pro clean install 2026-03-30, replaced CachyOS. All tools installed.

View File

@@ -0,0 +1,35 @@
---
name: /tmp resolves to two different paths on Windows
description: On Windows machines (Howard's, etc.), the Write tool and Git Bash resolve `/tmp` to different real directories. Never use `/tmp/<file>` for handing JSON payloads from Write to curl — they will not see the same file.
type: feedback
---
On Windows under this Claude Code harness:
- **Write tool** resolves `/tmp/foo.json``C:\tmp\foo.json`
- **Git Bash + curl + cat** resolve `/tmp/foo.json``C:\Users\<user>\AppData\Local\Temp\foo.json`
These are two different real directories. Write reports "File created successfully at: /tmp/foo.json" but the bytes land in `C:\tmp\`, while bash commands later read a stale (or missing) file from `C:\Users\<user>\AppData\Local\Temp\`.
**Why:** Git Bash's MSYS layer mounts `/tmp` to `%TEMP%`. The Claude Code Write tool resolves Unix-style absolute paths against the Windows root instead.
**How to apply:** When passing a JSON payload from Write to a Bash curl call (Syncro, GitHub, any REST API), do ONE of the following — never use `/tmp/`:
1. **Heredoc inline in curl** (preferred for short payloads):
```bash
curl -s -X POST "$URL" -H "Content-Type: application/json" -d @- <<'JSON'
{"subject": "...", "body": "..."}
JSON
```
2. **Write to a workspace path both tools agree on**, e.g. under the repo:
```
C:\claudetools\.claude\tmp\payload.json
```
(gitignored if needed). Both Write and Bash will hit the same file there.
3. **If you must use a temp dir, use `$TEMP` / `$TMPDIR` in bash, and write the file via Bash heredoc rather than the Write tool.**
**Real incident — 2026-05-01 ticket #32225 (Sombra Residential):** Wrote a Sombra resolution payload to `/tmp/comment_payload.json` via Write tool. Curl read a stale Cascades/Karen Rossini payload from yesterday's session at the bash-side `/tmp`. POSTed the wrong comment to the Sombra ticket — comment #408671678 had completely unrelated content and required manual GUI deletion (Syncro has no API delete for comments).
**Note for skill authors:** The `syncro` skill examples use `/tmp/` paths. Those examples are unsafe on Windows and need to be updated to use heredoc or workspace paths.