Repository navigation
Description
Problem
Claude stages are refused, by Claude's own permission layer (claude_permission: --allowedTools / permissions.allow), read-only commands that the same agent runs directly in the same environment, plus the stage's own required publication. The refusals are neither asked nor offered as a grant, and the stage then ends BLOCKED even when its work is complete. That breaks capability parity (docs/host-permissions.md#agent-capability-parity, #450) and reopens what #524, #464 and #406 closed.
Evidence (cycle for #486, PR #549, 2026-11-29, Claude Code 2.1.332)
Implement stage (Claude Opus 5.5 fallback): the work was complete (3 commits, PR #549 opened, local suite passed), but the stage reported BLOCKED with stop_reason=stage_not_completed. It was refused:
git grep -n "def require_security" -- scriptsgit grep -n -F "prefix=\"diff-" -- scriptsgit grep -n -e tool-results -e "tasks/" -e "def test" -- tests/test_read_parity.pygit diff --output=$TMPDIR/wip.diffgh pr view 549 --repo … --json headRefOid,statusCheckRollup,body --jq …gh pr edit 549 --repo … --body-file $TMPDIR/report.md(the stage's own receipt publication)- the
mcp__serena__find_symboltool
Review stage (Claude Sonnet 5.5): it returned REVIEW_PASSED_AWAITING_CI, but it was refused ten read-only commands, for example:
grep -n "def \(stage\|require_security\|complete\|mark\)" scripts/plan_service.pygrep -rn "exactly one attributable" scripts/stage_evidence.pygit grep -n "def receipt_problem" -- scriptsgh pr view 549 --repo … --json comments --jq ".comments[-1].url"
Every refusal is attributed to claude_permission, not to the toolkit's hook_bash. The toolkit therefore built a Claude dispatch whose allow list does not cover commands that its own stage table and #524 classify as read-only, or as consentable.
Expected
- A read-only command the stage table accepts, or Stages are refused ordinary read-only Git, gh and unittest commands that the agent runs directly (capability parity #450) #524 classifies as read-only, is never refused by the dispatch's Claude permission configuration.
- A form that needs consent under Stages are refused ordinary read-only Git, gh and unittest commands that the agent runs directly (capability parity #450) #524 (quoted, escaped or
--jqarguments) is asked once, per Ask before denying any command outside a stage's command table: grant per cycle, repository or forever, never block the cycle #406, instead of being refused by the host layer. - The stage's own documented publication (
gh pr edit --body-file $TMPDIR/report.md) is always allowed. - A refused optional command never turns a completed stage into
BLOCKED, per A finished stage ends BLOCKED on refused read-only commands, and detached runs cannot answer consent #464 and Review recovery fails after an unreadable result or a stage-local permission stop: rereviews of the same head repeat and the CI gate never runs #486.
Acceptance criteria
- Native
claude -pparity tests (as in Run native claude -p and codex exec parity checks for the Git, gh and Compose consent conversions (#456 AC-2) #516) cover each command above: it runs, or it asks for consent; it is never refused silently byclaude_permission. Inherited MCP tools (such asmcp__serena__find_symbol) are excluded from this requirement and keep the Review recovery fails after an unreadable result or a stage-local permission stop: rereviews of the same head repeat and the CI gate never runs #486 model: the toolkit neither hides nor pre-approves them, and a host denial is recorded as a host limit. - A regression test: an implement stage that publishes its receipt after a refused optional command ends
IMPLEMENTED, notBLOCKED. A second test covers a refused optional inherited MCP tool with the same outcome. - The PR identifies the layer that actually refused each reported command (dispatch-generated Claude permissions, the toolkit hook, or both recorded twice as
claude_permission), shows it with reproducible native evidence, and fixes the responsible layer without widening security or consent boundaries. - The toolkit-hook refusals reported from the Recover interrupted writing stages from durable scoped checkpoints #503 cycle are in scope for correct enforcement, attribution and stage completion. The Stages are refused ordinary read-only Git, gh and unittest commands that the agent runs directly (capability parity #450) #524 consent boundaries are kept: commands already consent-free are not refused, complex forms still ask for consent, and the consent-free set is not widened. An optional denial never invalidates completed work, a trusted receipt or existing verification evidence.
docs/host-permissions.mdanddocs/capability-parity-audit.mdare updated. Every issue reviews the GitHub-facing documentation, per AGENTS.md.
Activity
docs: track #550 and #551 in the M1 roadmap row (#552)
datacas commentedon Nov 29, 2026
More evidence from the #503 implement stage (2026-11-29, Claude fallback, PR #554): the stage finished its work and pushed, but it ended
BLOCKEDwithstage_not_completedonly because the stage hook refused 25 commands, nearly all of them read-only:git grep -n …with ordinary patterns,-A/-B/-o/-i -E("complex read arguments need operation consent")grep -n "import yaml" tests/…git ls-files … | head -200; wc -l …("shell syntax needs operation consent")git --version("git global options other than --no-pager are not allowed")printenv CODE_CYCLE_STAGE_ROLE …gh pr view 554 --json … --jq …and the stage's own receiptgh pr comment 554 --body-file $TMPDIR/pr-comment.mdThe agent can run every one of these directly in the same environment, so the refusal is a toolkit veto under #450, and turning the refusals into a
BLOCKEDstop discards a completed implementation.fix: match the own pull request against the runtime's cycle branch fi…
test: assign test_claude_stage_refusals to a Windows shard (#550)
fix: never turn an inherited MCP denial into an unattended consent qu…
fix: attribute Claude stage refusals to the refusing layer and keep c…
docs: record the #550 refinement and its follow-ups #556-#558 in the …