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
design: pending approval expires after 10 minutes, then an auto-judge decides (opt-in) #995
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:
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.
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).
Fail-closed. Judge error, timeout, malformed answer, or low confidence means DENIED, exactly as today.
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).
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.
Gateway and desktop. The chat message for a pending approval should say it auto-resolves at HH:MM.
Budget. The judge call is counted against the session budget.
Activity
docs: address review of the approval auto mode note (#995)
docs: design note for approval auto mode (#995) (#996)