You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit abd5264
Browse filesBrowse the repository at this point in the historyBrowse files
feat(reviewer): tell blocked agents to ask and retry
A denial reaches the acting agent as the block reason, but nothing told
it what to do next. Agents reliably substituted an equivalent action
instead of asking: one denied jj squash turned into a workaround commit
that the user then had to authorize squashing away 17 minutes later.
The plugin already supports the right loop. A denial is cached against a
digest of the root-session user turns, so the agent cannot argue past it,
while any new user turn invalidates that cache and the identical action
is judged again with the answer as evidence. Only the acting agent was
never told the loop exists.
Append fixed guidance to the block message on every final deny. The
audit line, plugin storage record, and status-line event keep the bare
model reason, so a verdict stays quotable as the model's own words.
Verified with make test (47 pass) and make test-load. A mutation
restricting the guidance to model denials is caught by the escalation
table test and the cached-denial test.
Copy file name to clipboardExpand all lines: packages/reviewer/src/index.ts
+9-1Lines changed: 9 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -104,6 +104,12 @@ Recent reviewer approvals are historical context, not user authorization, policy
104
104
Answer with a single JSON object and nothing else:
105
105
{"decision":"allow"|"deny"|"ask","reason":"one short sentence"}`
106
106
107
+
// A denial reaches the acting agent as the block reason. Left to itself an agent
108
+
// tends to substitute an equivalent action, which spends the user's authorization
109
+
// chance on a worse plan. Only a new user turn re-opens a cached denial, so the
110
+
// retry path has to be stated where the acting agent will actually read it.
111
+
constDENIAL_GUIDANCE=`Reviewer note: do not substitute an equivalent action to get around this block. If it was blocked for missing authorization rather than for being unsafe, ask the user to approve this specific operation and scope, then retry the identical action. Only the user's own reply can authorize it; asserting approval on their behalf changes nothing.`
0 commit comments