Rendered from docs/process/obligations/0206-hw-run-policy-names-a-worktree-add-workaround-that-write-edit-refuses-under-this-harness.md in the Headwater corpus. Every document on this half of the site is typed by the taxonomy the descriptor names: corpus.json.

hw-run-policy names a worktree-add workaround that Write/Edit refuses under this harness

Context

.claude/skills/hw-run-policy/SKILL.md line 37 reads: "Write is refused in the shared checkout and EnterWorktree is refused from a subagent. Make a worktree by hand with git worktree add, from origin/main after a fetch, and remove it at the end or say that it is still there." Under this harness, Edit/Write on a file under a worktree a session makes by hand is refused. The write sandbox is pinned to the one worktree the subagent was launched into, not to any it creates afterward. The refusal names the launch worktree as the one to edit instead. Two independent build agents in run 20260922-1121 (working #971 and #574) each spent real time discovering this on their own. Both fell back to git checkout -b <branch> origin/main inside their own launch worktree. That is what every build agent in that run actually did, per git worktree list at the time.

Obligation

The documented workaround describes a pattern that fails under this harness's own sandbox rule. A future subagent reading this line will hit the same refusal and lose the same time two agents already lost in run 20260922-1121. The line needs to name the pattern that works — a branch checked out inside the subagent's own launch worktree — rather than the one that fails.

Discharge

This discharges when .claude/skills/hw-run-policy/SKILL.md's line for a subagent's own workspace is rewritten. The rewrite names git checkout -b <branch> origin/main, run inside the subagent's own launch worktree, as the working pattern. The git worktree add line is removed, or it stays and states why it does not work here.

This record is discharged. .claude/skills/hw-run-policy/SKILL.md now names a branch made in place inside the launch worktree, and the git worktree add line is gone. The skill writes git switch -c where this record writes git checkout -b, and the two commands do the same work. The owner accepted the discharge on 2026-09-30, in the roadmap review of that day.