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
Require deterministic user confirmation for tool actions #3320
Some tool actions should never run without the user's explicit confirmation, no matter how clearly the request names them. Examples are creating a GitHub repository or other effects that are hard to undo. Junior has no code-enforced way to require this today.
Tools declare approvalMode as auto, review, or approve (packages/junior-plugin-api/src/tools.ts). approve skips review. auto and review route the call to Guardian.
Guardian rates risk and user authorization, and guardianDecision (packages/junior/src/chat/guardian/reviewer.ts) maps the named rule to allow, ask, or deny. Whether it asks depends on the model's judgment. A clear request usually gets allow.
Code forces only two outcomes: an ask turns into a deny in Automation runs, and high or critical risk with low or unknown authorization asks.
An ask rejection has no durable link to the user's later answer. A retry goes back through model review, so an earlier ask cannot be checked as a precondition.
Tool permissions (approvalMode) and Guardian policy are separate systems. A tool cannot declare "always needs this person's confirmation" in a way core enforces.
Prior art: #3319 first tried a confirm approval mode. It looked up earlier-Turn ask rejections for the exact input and capped the decision at ask without them. That was dropped from the PR because a correct version needs a refactor across Guardian and tool permissions. Known gaps of that attempt: a confirmation in the same Turn, compaction that drops the earlier ask, and child agents with a system Actor.
Direction from the prior-art review of Codex and Claude Code (canvas): add an ask permission that core enforces, following both tools.
Prior art
Codex: a managed prompt-user rule becomes NeedsHumanApproval. Hooks, automated review and reusable approvals can't satisfy it, and it's rejected when no human can answer (core/src/tools/approvals.rs, config/src/requirements_exec_policy.rs).
Claude Code:ask rules, requiresUserInteraction tools and connector tools set to ask always prompt, even in auto and bypass mode, and offer no "don't ask again".
Shape
Vocabulary: a tool's permission is allow / review / ask / deny. review sends the call to Guardian, which keeps returning allow / ask / deny.
What ask does: the call waits for a person instead of being rejected back to the model. Core stores the exact call (tool, input, credential, destination) and who may approve it, then files the review item itself. A child sends it up to the root, and the approver is still the person.
Approval: when the approver says yes, core runs the stored call and sends the result into the conversation. The model doesn't re-issue the call, and nothing a model writes can approve it.
No human present: in scheduled and event runs, ask is denied right away.
An ask from Guardian follows the same path.
First tools on ask: deletes that can't be undone, which means deleteAutomation, deleteWorkspace and MCP tools marked destructiveHint, plus github_createRepository (#3319). Actions that can be undone (archive, stop, unpublish) stay on review.
This also fixes the known gaps of the #3319 attempt: a confirmation in the same Turn, compaction dropping the earlier ask, and child agents with a system Actor.
Activity
ref(github): Review repository creation like other GitHub writes
sentry-junior commentedon Nov 13, 2026
Direction from the prior-art review of Codex and Claude Code (canvas): add an
askpermission that core enforces, following both tools.Prior art
prompt-userrule becomesNeedsHumanApproval. Hooks, automated review and reusable approvals can't satisfy it, and it's rejected when no human can answer (core/src/tools/approvals.rs,config/src/requirements_exec_policy.rs).askrules,requiresUserInteractiontools and connector tools set toaskalways prompt, even in auto and bypass mode, and offer no "don't ask again".Shape
allow/review/ask/deny.reviewsends the call to Guardian, which keeps returning allow / ask / deny.askdoes: the call waits for a person instead of being rejected back to the model. Core stores the exact call (tool, input, credential, destination) and who may approve it, then files the review item itself. A child sends it up to the root, and the approver is still the person.askis denied right away.askfrom Guardian follows the same path.First tools on
ask: deletes that can't be undone, which meansdeleteAutomation,deleteWorkspaceand MCP tools markeddestructiveHint, plusgithub_createRepository(#3319). Actions that can be undone (archive, stop, unpublish) stay onreview.This also fixes the known gaps of the #3319 attempt: a confirmation in the same Turn, compaction dropping the earlier ask, and child agents with a system Actor.
fix(guardian): Deny an action with a shortened input
sentry-junior commentedon Nov 23, 2026
Closing as superseded by the Guardian redesign: intent in #4139, technical proposal in #4140. This issue's concern is covered there.