Skip to content

Track Guardian review goals and known gaps #3947

Done

Description

@sentry-junior

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

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.

--

View Session [Sentry]

Activity

  1. sentry-junior commented on Nov 22, 2026

    @sentry-junior
    ContributorAuthor

    Direction from @dcramer (#4012):

    • Guardian should block unsafe actions. It should not ask about routine, in-scope work.
    • A child agent should not treat its parent's instructions as unsafe. The parent's message is the child's instruction.
    • Review matters most on the Lead and other top-level Turns. There it should check that an action, such as starting or messaging a Conversation, is clearly what the person asked for, so the agent can't start Conversations nobody asked for.
    • Until the structural fix is designed, it's fine to keep asking for approval in these cases.

    Two false asks from one session:

    • A parent's messageAgent was 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.
    • Each push or draft PR from a child Thread needed its own inbox approval, even after the person had approved the work behind it.
  2. sentry-junior commented on Nov 23, 2026

    @sentry-junior
    ContributorAuthor

    Closing as superseded by the Guardian redesign: intent in #4139, technical proposal in #4140. This issue's concern is covered there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions