Skip to content

fix(guardian): Reject an oversized action instead of aborting the Run - #3946

Closed
sentry-junior[bot] wants to merge 1 commit into
mainfrom
fix/guardian-oversized-proposal
Closed

sentry-junior[bot] wants to merge 1 commit into
mainfrom
fix/guardian-oversized-proposal

Conversation

@sentry-junior

@sentry-junior sentry-junior Bot commented Nov 21, 2026

Copy link
Copy Markdown
Contributor

A proposal over MAX_PROPOSAL_CHARS (192,000) made guardianPrompt throw. The gate turned that into ToolActionReviewUnavailableError and aborted the whole Run, so one large PR body, file write, or message killed the Turn.

  • guardianPrompt now throws ToolActionProposalTooLargeError.
  • The gate rejects only that action with a ToolInputError: "This call is too large to review, so it was not run. Send a smaller change, such as a shorter input or several smaller calls." It is not a Guardian decision, so it gets none of the risk-deny instructions, records no decision, and does not count toward the consecutive-rejection limit.
  • Every proposal that fits is reviewed exactly as before. There is no truncation and no input budget.

Split out of #3330, whose truncate-and-deny approach would also reject inputs that review today.

via @dcramer.

--

View Session [Sentry]

A proposal over MAX_PROPOSAL_CHARS made guardianPrompt throw. The gate
turned that into ToolActionReviewUnavailableError and aborted the whole
Run. The reviewer now throws ToolActionProposalTooLargeError, and the gate
rejects only that action with a size-specific ToolInputError. Proposals
that fit are reviewed as before.

Co-Authored-By: David Cramer <[email protected]>
@vercel

vercel Bot commented Nov 21, 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 Nov 21, 2026 6:46pm UTC

Request Review

@blacksmith-sh

blacksmith-sh Bot commented Nov 21, 2026

Copy link
Copy Markdown
Contributor

Found 4 test failures on Blacksmith runners:

Failures

Test View Logs
[inbox] › packages/junior-dashboard/e2e/
composer-typeahead.spec.ts:193:1 › a pasted Slack mention becomes a mention
View Logs
[inbox] › packages/junior-dashboard/e2e/
composer-typeahead.spec.ts:312:3 › a archived conversation's mention card has no Invite
View Logs
[inbox] › packages/junior-dashboard/e2e/inbox/
conversations-read-position.spec.ts:394:3 › new UI › jumps to the latest page without t
he newer pages @new
View Logs
new UI/jumps to the latest page without the newer pages @new View Logs

Fix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.

@sentry-junior

sentry-junior Bot commented Nov 23, 2026

Copy link
Copy Markdown
Contributor Author

Closing so we can take a more considered look at Guardian. This PR's concern (an oversized action aborting the Run) goes into the Guardian redesign ticket as an input.

@sentry-junior sentry-junior Bot closed this Nov 23, 2026

This branch was successfully deployed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant