Repository navigation
Done
Description
Guardian reviews permissioned tool actions before they run. This issue tracks what it should achieve, the gaps in the code today, and the work that's open or deferred. Clear bugs with simple fixes can land on their own. Changes to how Guardian decides should wait for a broader redesign.
Goals
- Review keeps working. A reviewer problem never fails more requests than it has to.
- Guardian sees enough context to judge the action, but not the agent's arguments for it.
- Decisions are correct: few false asks or denies on requested work, and no false allows.
- Decisions can be measured, and production cases can become eval cases.
Known gaps
- A reviewer failure aborts the whole Run. Timeouts, retry exhaustion and schema errors in the reviewer call all take the fatal path. So does a proposal over
MAX_PROPOSAL_CHARS(reviewer.ts). Codex and Claude Code reject only that one action. - Asks use up the three-rejection limit. Repeated asks reach the limit. The limit text then calls the action an "unacceptable risk", although the action is only waiting on an unanswered question.
- Decisions aren't observable. The fired rule isn't on spans, and the scrubber filters the user-authorization attribute. Proposal size isn't recorded, and a timeout can't be told apart from a parent abort.
- The evals skip the real evidence path. Cases pass evidence in directly, so the core evidence and root-conversation builders never run. There's no coverage for near-budget or oversize proposals, repeated asks, or injection in tool results, and each case runs only once.
- False asks and denies on requested work. test(guardian): Add cases for Guardian misses in production reviews #3119 has confirmed cases.
Related work
- feat(guardian): Skip review of read-only auto tools #3332 (merged): read-only
autotools skip review. - Require deterministic user confirmation for tool actions #3320 and feat(guardian): Add the ask tool permission with core-run approvals #3335: a code-enforced
askpermission, and the rule that an approved action runs as its approver. - fix(guardian): Bound large tool input instead of failing review #3330: oversized tool input. A separate breakout fix covers only the Run abort.
- perf(guardian): Drop assistant text, tool results, and repeated messages from evidence #3331: evidence drops assistant text and tool result bodies. Whether to keep result bodies is still open.
- Guardian loses the user request in long multi-agent threads #2768: Guardian loses the user request in long multi-agent threads.
Proposals from the prior-art comparison (not decided)
These came from comparing Guardian with Codex (openai/codex) and Claude Code. They're input for the redesign and haven't been agreed.
- Treat a reviewer failure as a rejection of that one action, after one retry. Give it its own message, and don't count it toward the limit.
- End exhausted asks with a question to the person.
- Keep tool result bodies in the evidence, gated on evals. Codex keeps them, and Anthropic's published data points both ways.
- Never truncate the action itself. Size the evidence from the room the action leaves. Reject an action that's too large on its own, with a reason that isn't a risk denial.
- Turn labeled production decisions into placeholder fixtures. Run each case several times, report results per rule, and gate policy changes on a must-deny regression set.
- Not planned: a two-stage classifier, a reviewer with tools, or a fixed input cap. No rolling-window breaker until telemetry shows a need for one.
via @dcramer.
--
Metadata
Metadata
Assignees
Labels
No labels
Activity
sentry-junior commentedon Nov 22, 2026
Direction from @dcramer (#4012):
Two false asks from one session:
messageAgentwas held for user confirmation. It told the child to add an eval case to the child's own draft PR, and the child had already put that question to the person.sentry-junior commentedon Nov 23, 2026
Closing as superseded by the Guardian redesign: intent in #4139, technical proposal in #4140. This issue's concern is covered there.