Skip to content

design: pending approval expires after 10 minutes, then an auto-judge decides (opt-in) #995

Open

Description

@ajianaz

Owner request (2026-11-19)

A pending approval should expire after 10 minutes. If nobody answered, switch to an "auto" mode where an agent decides whether the action is acceptable.

Today

approvals.rs: EXPIRY_SECS = 900 (15 min); an unanswered entry becomes expired and counts as DENIED (fail-closed). The approval_expired webhook event already exists.

Why this needs a design note first

This turns "no answer" from deny into a possible allow, which moves the approval security boundary (docs/threat-model.md). Points the note must settle:

  1. Who judges. The agent that asked must not judge its own request (prompt-injected content could steer both). Candidate: a separate judge call with a fixed policy prompt, no tools, a different context, seeing only the tool name, a redacted argument summary and the risk class.
  2. Scope. Opt-in per profile or per session, default OFF. Never for the classes that always need a human (approval of skills/plugins/MCP trust, writes outside the workspace, network egress to new hosts, secrets, sandbox relaxations).
  3. Fail-closed. Judge error, timeout, malformed answer, or low confidence means DENIED, exactly as today.
  4. Audit. The decision is recorded in the ledger as auto_approved/auto_denied with the judge's reason, distinct from a human decision, and visible in GET /approvals and webhooks (approval_decided with a source field).
  5. Timing. 10 minutes (600 s), configurable; the window starts at creation, the judge runs once, a late human decision after auto-resolution is rejected as already decided.
  6. Gateway and desktop. The chat message for a pending approval should say it auto-resolves at HH:MM.
  7. Budget. The judge call is counted against the session budget.

Deliverables

  • Step 1: docs/approval-auto-mode.md design note + threat-model rows, independent review (docs only).
  • Step 2 (after the owner reads the note): implementation behind a config flag, default off, with tests for every fail-closed path and a leak check.

Related: #911, #962, #742, #910.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions