Converge MSYS_NO_PATHCONV=1 into Windows-host ansible (kill MSYS path-mangling of leading-slash args) #449

Closed
opened 2026-07-03 07:46:23 +00:00 by coilyco-ops · 2 comments
Member

Problem

On Windows hosts, the Claude Code Bash tool (and any git-bash/MSYS2 shell) auto-converts leading-slash arguments into Windows paths. aws ssm get-parameter --name /forgejo/api-token gets mangled into C:/msys64/forgejo/api-token, which returns ParameterNotFound. This bites agent sessions daily and every session re-derives the diagnosis from scratch.

Root cause: MSYS path conversion. Fix: MSYS_NO_PATHCONV=1.

What was done (object-level)

Set MSYS_NO_PATHCONV=1 in this tower's Windows user environment (HKCU\Environment, via [Environment]::SetEnvironmentVariable(...,'User')). Confirmed reading back as 1. Inherited by every future shell + agent session on this box.

Meta-fix (this issue)

That fix is machine-local — it won't follow to another Windows host, which conflicts with the fleet-converged-config doctrine. Codify MSYS_NO_PATHCONV=1 in the Windows-host ansible convergence (agent-compose / the Windows env role) so a fresh Windows checkout gets it automatically.

Collateral / notes

  • MSYS_NO_PATHCONV=1 disables the helpful /c/foo -> C:\foo translation. Per-command escape hatch: MSYS_NO_PATHCONV= docker run -v /c/foo:/foo ....
  • Alternatives considered: ~/.claude/settings.json env block (agent-only), or a surgical aws() wrapper (aws-only). Machine-wide was chosen for full coverage.
## Problem On Windows hosts, the Claude Code Bash tool (and any git-bash/MSYS2 shell) auto-converts leading-slash arguments into Windows paths. `aws ssm get-parameter --name /forgejo/api-token` gets mangled into `C:/msys64/forgejo/api-token`, which returns `ParameterNotFound`. This bites agent sessions daily and every session re-derives the diagnosis from scratch. Root cause: MSYS path conversion. Fix: `MSYS_NO_PATHCONV=1`. ## What was done (object-level) Set `MSYS_NO_PATHCONV=1` in this tower's Windows user environment (`HKCU\Environment`, via `[Environment]::SetEnvironmentVariable(...,'User')`). Confirmed reading back as `1`. Inherited by every future shell + agent session on this box. ## Meta-fix (this issue) That fix is machine-local — it won't follow to another Windows host, which conflicts with the fleet-converged-config doctrine. Codify `MSYS_NO_PATHCONV=1` in the Windows-host ansible convergence (agent-compose / the Windows env role) so a fresh Windows checkout gets it automatically. ## Collateral / notes - `MSYS_NO_PATHCONV=1` disables the helpful `/c/foo -> C:\foo` translation. Per-command escape hatch: `MSYS_NO_PATHCONV= docker run -v /c/foo:/foo ...`. - Alternatives considered: `~/.claude/settings.json` env block (agent-only), or a surgical `aws()` wrapper (aws-only). Machine-wide was chosen for full coverage.
Author
Member

WARD-RESERVATION: held 🔒

reservation details

Holder: container engineer-codex-infrastructure-449 on host kais-macbook-pro-2.local.

Reserved by ward agent --harness codex (reserved 2026-07-10T11:26:32Z). Concurrent ward agent runs are blocked until it finishes or the reservation goes stale (1h TTL). --force overrides.

Do not comment on or edit this issue to steer the run while it is reserved. The engineer seeded the body once at launch and never re-reads it, so a comment or edit reaches only human readers, never the running engineer. A correction goes to a new issue, dispatched fresh. That is the only channel that reaches a run in flight. Where the forge supports it, ward locks this conversation to make that a road-block rather than a convention (ward#494).

run seed context — what this run is carrying (ward#609)
  • Resolved: coilyco-flight-deck/infrastructure#449 · branch issue-449 · harness codex · workflow direct-main
  • Run: engineer-codex-infrastructure-449 · ward v0.580.0 · dispatched 2026-07-10T11:26:32Z
  • Comment thread: 0 included in the pre-flight read, 0 stripped (ward's own automated comments).

Static container doctrine and seed boilerplate are identical every run and omitted here (they ride ward v0.580.0).

— Codex, via ward agent

<!-- ward-agent-reservation --> WARD-RESERVATION: held 🔒 <details><summary>reservation details</summary> Holder: container `engineer-codex-infrastructure-449` on host `kais-macbook-pro-2.local`. Reserved by `ward agent --harness codex` (reserved 2026-07-10T11:26:32Z). Concurrent `ward agent` runs are blocked until it finishes or the reservation goes stale (1h TTL). `--force` overrides. **Do not comment on or edit this issue to steer the run while it is reserved.** The engineer seeded the body once at launch and never re-reads it, so a comment or edit reaches only human readers, never the running engineer. A correction goes to a **new issue, dispatched fresh**. That is the only channel that reaches a run in flight. Where the forge supports it, ward locks this conversation to make that a road-block rather than a convention (ward#494). <details><summary>run seed context — what this run is carrying (ward#609)</summary> - **Resolved:** `coilyco-flight-deck/infrastructure#449` · branch `issue-449` · harness `codex` · workflow `direct-main` - **Run:** `engineer-codex-infrastructure-449` · ward `v0.580.0` · dispatched `2026-07-10T11:26:32Z` - **Comment thread:** 0 included in the pre-flight read, 0 stripped (ward's own automated comments). Static container doctrine and seed boilerplate are identical every run and omitted here (they ride ward v0.580.0). </details> </details> <!-- ward-agent-signature --> — Codex, via `ward agent`
Author
Member

WARD-OUTCOME: done

details workflow: direct-main; review summary: review gate skipped by ~/.ward/config.yaml default retrospective: the implementation felt straightforward once the staged Windows group and env-role split were in place. confidence: high surprises: the local ansible dry-run hit a missing `brew` on the container, which was unrelated to this change. follow-ups: none.
WARD-OUTCOME: done <details><summary>details</summary> workflow: direct-main; review summary: review gate skipped by ~/.ward/config.yaml default retrospective: the implementation felt straightforward once the staged Windows group and env-role split were in place. confidence: high surprises: the local ansible dry-run hit a missing `brew` on the container, which was unrelated to this change. follow-ups: none. </details>
Sign in to join this conversation.
No description provided.