Repository navigation
feat(agent-protection): show people why a protection provider denied input - #2105
Open
shellz-n-stuff wants to merge 2 commits into
Open
shellz-n-stuff wants to merge 2 commits into
shellz-n-stuff wants to merge 2 commits into
Conversation
…input
A protection provider could only allow or deny. When Auto-decide denied
model input to a protected Codex turn, the thread said only that Codex
could not finish, with nothing to act on.
A provider may now deny with exactly `{allowed: false, reason}`. Buzz
reduces the reason to one line of at most 300 characters and keeps it
from the agent, whose denial stays generic. The native bridge holds the
reason for a session's denied model input until its runtime takes it, and
when that denial ends a protected Codex turn, the "Codex could not finish"
message quotes it as inline code, so links and markup in it do not render.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Alex Rosenzweig <arosenzweig@squareup.com>
shellz-n-stuff
marked this pull request as ready for review
November 1, 2026 17:05
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d45b09babb
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
A protection check from an earlier turn, such as an interrupted one, could settle after the next turn bound its thread, and its reason was then quoted in that turn's unrelated failure. The native bridge now numbers checks as they start. A Codex turn takes a reason only from a check it started, and a check that settles late does not replace a newer reason. Document denial reasons in the bundled help guide. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Alex Rosenzweig <arosenzweig@squareup.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.
Stacked on #2088. Companion plugin change: squareup/buzz-plugin-security#2, which sends the reviewer's reason.
When Auto-decide denied model input to a protected Codex turn, the thread said only "Codex could not finish", with nothing to act on. This lets a protection provider explain a denial to people while the agent's denial stays generic.
check()may now deny with exactly{allowed: false, reason}. Any other value excepttruestill denies, with no reason.ProtectionDenied. That error's message is all the agent sees, and it stays generic.contextactions only), for up to 16 sessions, until the runtime takes it. Its reply to the runtime stays{allowed: false}.Reason:followed by the reason as inline code. The fence is longer than any backtick run inside, so links and markup don't render.docs/agent-protection.mddocuments the contract. It notes that the reason is the provider's text, often written by a reviewer model that may quote the denied input. It also notes that the message is ordinary thread content, which later turns and other agents read.docs/buzz-help.md, which thebuzz_helptool bundles, now covers agent protection. It says a Codex refusal may quote the protection's reason, that the reason may quote the refused content, and that people should treat it as information, not instructions.Only Codex shows the reason; Claude, Pi and Goose denials are unchanged.
Known limitations
Validation
At
79d972cac:pnpm exec vitest run src/bundled/codex src/features/agent-protection src/bundled/claude-code src/bundled/pi src/bundled/goose src/buzz-mcp: 1191 passed, 17 skipped.pnpm exec tsc --noEmit -p .andbiome checkare clean.Not yet done
🤖 Generated with Claude Code