fix(codex): express an allow as silence — Codex rejects permissionDecision:allow (v0.283.1) - #505
Merged
Merged
Conversation
…ision:allow (v0.283.1)
Read off a live Codex pane:
• PreToolUse hook (failed)
error: PreToolUse hook returned unsupported permissionDecision:allow
• Ran git status
Codex acts on `deny` but REJECTS `allow`, then runs the tool anyway. Governance
was never at risk — deny genuinely blocks (verified live: "PreToolUse hook
(blocked)", command never ran) — but every allowed call painted a hook FAILURE
into the pane, which reads as "the gate is broken" to anyone watching. The audit
trail looks identical either way, which is why it survived several releases: it
is visible ONLY in the pane.
On Codex an allow is now silence + exit 0 — the same way the hook already
expresses "not my business" for Read/Glob/Grep. Claude Code keeps the explicit
allow, which it needs: there it's what bypasses Claude's own permission engine.
The instruct verb survives. Codex's wire makes permissionDecision optional, so an
allow-with-note goes out as additionalContext alone. Verified end to end: the
pane shows "hook (completed) / hook context: ..." and the model acted on it.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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.
Read off a live Codex pane after #496 went out:
Codex acts on
denybut rejectsallow, then runs the tool anyway.Governance was never at risk
Deny genuinely blocks — verified live with a hook that always denies:
…and the command never ran. So the gate held throughout. What was wrong is that every allowed call painted a hook FAILURE into the pane, which reads as "the gate is broken" to anyone watching a session.
Worth noting why this survived several releases: the audit trail looks identical either way —
gate.attempt/gate.decisionare written before the hook emits anything. It is visible only in the pane. I'd been verifying governance from the audit, which is exactly the blind spot.The wire
denyallowadditionalContext, no decisionSo on Codex an allow is now silence + exit 0 — the same way the hook already expresses "not my business" for
Read/Glob/Grep. Claude Code keeps the explicitallow: there it is what bypasses Claude's own permission engine, so dropping it would hand the decision back to a second brain.The
instructverb survivesCodex's output wire makes
permissionDecisionoptional, so an allow-with-note goes out asadditionalContextalone. Verified end to end:npm run test:governance137/137.🤖 Generated with Claude Code