Skip to content

fix(guardian): Let a child agent retry after the user says yes - #2451

Open
sentry-junior[bot] wants to merge 1 commit into
mainfrom
fix/guardian-child-approval-order
Open

sentry-junior[bot] wants to merge 1 commit into
mainfrom
fix/guardian-child-approval-order

Conversation

@sentry-junior

@sentry-junior sentry-junior Bot commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #2450.

The bug: a child agent gets blocked, the user says "yes", and it gets blocked again anyway.

Why: Guardian reads the user's messages and the child's steps as two separate lists with no times on them. So it can't tell the "yes" came after the block.

Example (#2435): 18:40 blocked → 18:42 David said "yes you can do that" → 18:43 the same edit was blocked again.

Fix: the user's messages and the child's steps now have times. A new rule says a "yes" after the block lets the retry go through.

Code: root-conversation.ts adds the message times, evidence.ts adds the step times, and reviewer.ts shows the times and adds the rule.

Tests: two new evals in child-agent-approval.eval.ts replay the #2435 case, and all 96 Guardian evals pass.

Not in this PR: the asks that never should have happened, like a +1 on Junior's own PR. That's #2438.

via David Cramer.

--

View Session [Sentry]

A child agent's evidence and its root Conversation are separate logs.
Guardian could not tell that a user's approval in the root came after a
rejection in the child, so it blocked the retry again.

Root messages now keep the time of their event, and evidence entries keep
the time of their message. The child rules tell Guardian to order the two
logs by time, so a later root confirmation resolves the ask.

Fixes #2450

Co-Authored-By: David Cramer <david@sentry.io>
@vercel

vercel Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
junior-docs Ready Ready Preview Oct 30, 2026 7:06pm UTC

Request Review

@sentry-evals

sentry-evals Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

Sentry Evals

junior-guardian

Run Status Passed Failed Errored Cost Tokens Duration
Head Passed 96 0 0 $0.03 0 35.10s

Base commit c122def has no eval run to compare against.

@sentry-junior sentry-junior Bot changed the title fix(guardian): Order child agent approvals by message time fix(guardian): Let a child agent retry after the user says yes Oct 30, 2026
@dcramer
dcramer marked this pull request as ready for review October 30, 2026 19:45
@github-actions github-actions Bot added the risk: medium PR risk score: medium label Oct 30, 2026

This branch was successfully deployed

1 active deployment
Preview – junior-docs — 663a9257 Deployed Oct 30, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk: medium PR risk score: medium

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Guardian ignores later approvals in child agent runs

0 participants