Repository navigation
Description
Summary
Add a core action-review boundary that prevents Junior from performing actions a reasonable user may consider high risk or surprising by default.
Most ordinary actions should continue automatically through a Codex-style Approve for me reviewer. Human confirmation is reserved for actions whose scope, persistence, destination, credential use, or consequences warrant explicit consent.
This is core runtime functionality. Plugins declare approval modes and describe proposed actions through the tool interface; plugins do not own policy enforcement, reviewer selection, approval persistence, or interface-specific UX.
Goal
When a permissioned tool reaches execution:
- Core constructs the exact proposed action from the validated tool call plus authoritative actor, source, destination, conversation, and credential context.
- Deterministic authorization checks reject impossible or unauthorized actions.
- The approval mode determines whether the action needs review.
- Guardian reviews eligible proposals and returns
allow,ask, ordeny. - Ordinary, proportionate actions are allowed automatically.
- Potentially surprising or high-risk actions ask the authorized user.
- Denied actions return to the agent as normal rejected tool results.
Examples that should normally be allowed include ordinary read access, common searches, one-time reminders, and normal scheduling requested by the user. The same tools may require confirmation when an invocation reads unusually broad or sensitive data, creates persistent recurring work, uses personal credentials later, targets a new destination, or performs destructive work.
Proposed Tool Shape
Tool definitions may declare an approvalMode:
auto: core selects the effective behavior from the tool source, annotations, and runtime defaults.review: the exact invocation enters the approval system before execution.approve: the tool is explicitly allowed without an approval request.
Approval mode and reviewer selection are separate. Guardian is an actor in the approval system, not a tool mode. Junior will initially route eligible approval requests to Guardian, which can approve automatically, ask the authorized user, or deny the action.
External, plugin, MCP, or otherwise material tools should default conservatively to review. Tool and MCP annotations such as readOnlyHint, destructiveHint, and openWorldHint are reviewer signals rather than final authority.
Tools may provide a small proposal description callback for domain-specific facts and presentation. Core supplies the authoritative tool identity, validated input, actor, source, destination, conversation, and credential context.
Core Boundaries
Core owns:
- canonical tool approval metadata
- effective approval-mode resolution
- reviewer selection
- enforcement immediately before tool execution
- proposal construction and authoritative runtime context
- deterministic authorization checks
- Guardian invocation and structured decisions
- durable pending approval state and exact-action binding
- turn pause and resume
- audit events and rejected-action results
- Slack, API, and local approval surface ports
Plugins describe their actions and execute only after core permits them. A plugin must not be able to mint a grant, select an authoritative actor or destination, select its reviewer, or bypass the core execution boundary.
Major Slices
- Improve core and plugin tool definitions with approval modes and optional proposal descriptions; adapt MCP tools into the same canonical metadata.
- Add approval-mode resolution and Guardian review for eligible tool actions with
allow,ask, anddenyoutcomes. - Add durable human confirmation and Slack UX for
ask, including actor binding, expiry, stale-action handling, and turn resume. - Adopt the system in the scheduler as the first complete consumer and validate ordinary scheduling versus recurring or delegated-credential cases.
Child issues should own the concrete API and implementation for each slice. This master ticket owns the goal, invariants, sequencing, and rollout criteria.
Invariants
- Review runs only at explicit action boundaries, not on every message.
- Approval mode determines whether review is required; it does not select the reviewer.
- Guardian sees the exact validated proposal and relevant user intent.
- Guardian recommends or escalates; it does not bypass deterministic authorization.
- Missing authoritative actor, destination, or credential context fails closed.
- Unknown material tool behavior defaults to
review. - A user confirmation applies only to the exact pending action.
- Equivalent side effects cannot bypass a denial by changing tool names.
- Human-facing approval delivery is interface-specific; approval semantics are not Slack-owned.
Initial Rollout
Preserve existing behavior until tools are explicitly classified or a compatibility-safe default is selected. Start with scheduler coverage so the contract is exercised by a real mix of ordinary and potentially surprising actions.
Non-Goals
- a general-purpose policy language
- workspace-wide permission administration UI
- persistent always-allow grants
- a broad action taxonomy or separate action registry
- retrofitting every existing tool in the first change
- model review on every user message or every inert internal tool call
Activity
hegu-1 commentedon Jul 14, 2026
The proposed boundary is strong. I would place the authoritative contract beside execution, with product surfaces and model reviewers acting as decision inputs rather than enforcement owners.
A minimal chain could be:
ActionProposal -> PolicyDecision -> ApprovalGrant -> ActionReceipt
ActionProposal binds the exact operation, target, canonical payload digest, actor/agent, and material side effects. PolicyDecision determines whether judgment is required. ApprovalGrant is scoped, expiring, single-use, and tied to that digest. ActionReceipt records attempted, executed, rejected, expired, or failed.
For delayed or scheduled work, approval should not remain valid indefinitely. Before execution, revalidate current permission, destination, policy version, and any freshness-sensitive evidence. If material context changed, return to pending review.
A model reviewer can estimate risk or detect indirect intent, but should not mint authority. Deterministic policy and an authorized human/service issue the grant. Denial-equivalence also becomes testable by normalizing action/target rather than comparing tool names.
A concrete risk-tier gate, capability-token schema, and provenance receipt are available here: https://github.com/hegu-1/enterprise-ai-os-architecture/tree/main/layers/07-governance
[-]feat: add an approval reviewer for high-risk agent actions[/-][+]feat: add core action review and approvals for permissioned tools[/+]feat(tools): declare approval modes (#1055)
fix(scheduler): Require action review for delete and run-now (#1324)
sentry-junior commentedon Nov 9, 2026
Fixed on main: core action review shipped —
approvalMode(#1055), Guardian enforcement (#1082,chat/guardian/gate.ts), and the review desk for human confirmation (#2401). Child issues #1050/#1052/#1053 are closed.Closed during a tracker cleanup. Reopen if something here is still missing.
docs(design): Add the Guardian design doc (#3599)