Repository navigation
docs(protected-paths): correct the rule, and make preflight refuse before it stalls - #108
Merged
Merged
Conversation
…fore it stalls
Six consecutive `loop-WeMeditateWeb` runs died on WeMeditateWeb#97, whose whole
deliverable is a one-line `.npmrc` change. Each stalled ~90 seconds in on
permission prompt Write: ... /.npmrc which is a sensitive file.
and then sat at `worker_status: requires_action` until its 150-minute lease
expired — seven dispatches, no branch, no PR, no journal entry.
Two things this repo asserted were wrong, and both changed run behaviour.
**`.claude/worktrees` is exempt from the guard.** `implement-issue` step 6 is
correct as written. Runs have been taking `--no-worktree` to dodge a guard that
was never there, and journalling that belief as measured fact.
**The guard reaches far beyond `.claude/`.** `.npmrc`, `.yarnrc*`,
`.pnpmfile.cjs`, `bunfig.toml`, `.gitconfig`, `.gitmodules`,
`.pre-commit-config.yaml`, `lefthook.*`, `.mcp.json`, `.husky/`, `.git/` and
more all stall a run identically. Nothing in the loop's docs said so, and
`handler-preflight` — the file every run reads first — said nothing about
protected paths at all, so nothing warned a run before it hit the wall.
`handler-preflight` now carries the check: decide whether you *can* write the
ticket's targets before planning how, hand the ticket back when you cannot, and
never route around the prompt with `sed -i`, a heredoc or `git apply`.
Also softened "you cannot detect having been blocked" in why.md. From inside a
run that holds; from outside, the routines API reports `requires_action` within
about 90 seconds. The dispatcher not polling for it is a known gap, not a law of
nature.
`permissions.allow` genuinely cannot pre-empt the guard — that part was right.
Which means the `Write(**/.claude/**)` entries on the loop routines do nothing.
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Contributor
|
I could not request a reviewer here, so this is the step left for you.
🤖 sydevs dispatcher |
This was referenced Sep 18, 2026
14 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Six consecutive
loop-WeMeditateWebruns died on WeMeditateWeb#97, whose whole deliverable is a one-line.npmrcchange. Each stalled about 90 seconds in, on the same event:then sat at
worker_status: requires_actionuntil its 150-minute lease expired. Seven dispatches across three days, no branch, no PR, no journal entry, threeattempts-exhaustednotices.What this repo had wrong
.claude/worktreesis exempt from the guard.implement-issuestep 6 is correct as written. Runs have been taking--no-worktreeto dodge a guard that was never there — and journalling that belief as measured fact, which is how it spread. Step 6 is deliberately left unchanged by this PR.The guard reaches far beyond
.claude/..npmrc,.yarnrc*,.pnpmfile.cjs,bunfig.toml,.gitconfig,.gitmodules,.pre-commit-config.yaml,lefthook.*,.mcp.json,.claude.json, and the.git,.husky,.vscode,.devcontainer,.yarndirectories all stall a run identically. Nothing in the loop's docs said so, andhandler-preflight— the file every run reads first — said nothing about protected paths at all. Nothing warned a run before step 6.The one thing that was right:
permissions.allowcannot pre-empt the guard, because it runs first. Which also means theEdit(**/.claude/**)/Write(**/.claude/**)entries on all five loop routines do nothing and imply a protection that is not there. Worth removing from the routine configs separately — it is an account-level change, not a repo one.The guardrail
handler-preflightnow carries a Protected paths — check before you plan section: decide whether you can write the ticket's targets before planning how; when you cannot, comment which file forces it and that the change needs an attended run, unlock, and stop. Explicitly: do not route around the prompt withsed -i, a heredoc redirect orgit apply— that is answering a safety prompt with nobody present.Also
docs/why.md's "You cannot detect having been blocked" is now "A blocked run cannot see that it is blocked". From inside a run the original claim holds. From outside it does not — the routines API reportsrequires_actionwithin ~90 seconds, and the dispatcher simply does not poll for it. Recorded as a known gap rather than a law of nature. The old heading had no inbound anchor references;#documentation-lives-outside-claudeis referenced byfinalize-prand was kept.Verification
claude plugin validate ./workflow --strict— passednode --test dispatcher/test/*.test.mjs— 75/75 passgrepfor both edited anchors across the repo; only#documentation-lives-outside-claudehas an inbound reference, and it still resolvesSources: Claude Code protected paths, plus the run logs for
cse_01Xeg72w69V2bwRYV1QsjJwgandcse_011o2eUogG7UT5zzb73yNQWu, 29 hours apart and ending identically.🤖 Generated with Claude Code