You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Let a Dispatched Worker's develop Merge Run Under Auto Mode #4206
Follow-up to #4079, whose recommendation the maintainer accepted on 2026-11-15. In a fleet burndown run, the workers' feature -> develop merges through scripts/pr_review.py merge were refused by Claude Code's auto-mode permission classifier. Each merge then waited on a dialog for the maintainer, costing hours across a batch. backlog-burndown "What Invoking This Skill Authorizes" already grants those merges for the run, but the harness does not see that grant.
Change
The installer already carries an allow rule for uv run --no-project --script scripts/pr_review.py:*, which covers merge, yet the classifier still refused. So first establish why: the refusing host may not have carried the kit, the command may have been invoked in a shape the rule does not match, or the classifier may judge a merge apart from allow rules. Then fix whichever it is under host-setup/agent-safety/, or record that no rule reaches it.
This edits host-setup/agent-safety/, so it needs the maintainer's approval of the design, and its pull request merges only after the maintainer reads the diff.
Done when
A dispatched worker's develop merge under auto mode completes without a dialog on a host carrying the kit, or the issue records why no rule can reach the classifier.
Diagnosis, 2026-11-16, with the maintainer's choice of fix.
Why the classifier refused
The host carried the kit. Its narrow permissions.allow rules and its tagged autoMode entries were both present, and they are live in claude auto-mode config. The refusals came from the shape of the command, not from a missing rule.
A narrow allow rule resolves before the classifier, but only when the command text matches it. Across this host's local transcripts, 16 scripts/pr_review.py merge calls were refused between 2026-11-11 and 2026-11-13, 15 of them from dispatched workers. None of the 164 bare calls, the script named relatively in the rule's own spelling, was refused.
Each refused call broke the match in one of these ways:
A leading environment assignment, such as a uv cache variable. Claude Code strips only a built-in set of known-safe variables before matching, and an allow rule does not match past any other.
An extra flag between uv run and --no-project, which leaves the rule's prefix unmatched.
A script named by an absolute path or a shell variable, where the rule names scripts/pr_review.py relatively.
A compound command with a part no rule or read-only check passes. Once any part goes to the classifier, it judges the whole command and sees the merge.
The classifier's reasons were its defaults, Merge Without Review and Unrequested Commit in a Connected App.
The kit's autoMode.allow exception did not override them. It allows the merge "where a skill the session follows prescribes it". The classifier sees user messages, tool calls, and CLAUDE.md, so a worker's classifier has no way to check that condition.
The maintainer chose to fix the invocation shape, over a self-contained classifier exception, wider allow rules, or recording that no rule reaches it.
drive-pr and the backlog-burndown worker brief prescribe merge and cleanup as a Bash call of their own, in the rule's exact spelling. That means no environment prefix, no extra flag, no path variable, and no pipe or status tail.
The kit's README states why.
The classifier policy does not widen.
Before the shape is written down, a cd into the hub checkout ahead of the command is verified live, since the docs do not say how auto mode treats one.
Activity
ptr727 commentedon Nov 16, 2026
Diagnosis, 2026-11-16, with the maintainer's choice of fix.
Why the classifier refused
The host carried the kit. Its narrow
permissions.allowrules and its taggedautoModeentries were both present, and they are live inclaude auto-mode config. The refusals came from the shape of the command, not from a missing rule.scripts/pr_review.py mergecalls were refused between 2026-11-11 and 2026-11-13, 15 of them from dispatched workers. None of the 164 bare calls, the script named relatively in the rule's own spelling, was refused.uv runand--no-project, which leaves the rule's prefix unmatched.scripts/pr_review.pyrelatively.Merge Without ReviewandUnrequested Commit in a Connected App.autoMode.allowexception did not override them. It allows the merge "where a skill the session follows prescribes it". The classifier sees user messages, tool calls, and CLAUDE.md, so a worker's classifier has no way to check that condition.Sources: https://code.claude.com/docs/en/permissions.md ("Wrappers", "Compound commands") and https://code.claude.com/docs/en/permission-modes.md (the auto mode decision order).
The fix chosen
The maintainer chose to fix the invocation shape, over a self-contained classifier exception, wider allow rules, or recording that no rule reaches it.
drive-prand thebacklog-burndownworker brief prescribemergeandcleanupas a Bash call of their own, in the rule's exact spelling. That means no environment prefix, no extra flag, no path variable, and no pipe or status tail.cdinto the hub checkout ahead of the command is verified live, since the docs do not say how auto mode treats one.Run pr_review.py Calls in the Allow Rule's Exact Spelling Under Auto …