Repository navigation
fix(guardian): Let a child agent retry after the user says yes - #2451
Open
sentry-junior[bot] wants to merge 1 commit into
Open
sentry-junior[bot] wants to merge 1 commit into
sentry-junior[bot] wants to merge 1 commit into
Conversation
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>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
dcramer
marked this pull request as ready for review
October 30, 2026 19:45
This branch was successfully deployed
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.
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.tsadds the message times,evidence.tsadds the step times, andreviewer.tsshows the times and adds the rule.Tests: two new evals in
child-agent-approval.eval.tsreplay 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]