Skip to content

[FEATURE]: scoped auto-approval mode with expiry, persistent risk indicator and audit trail #51859

Description

@afonsoft

Feature hasn't been suggested before.

  • I have verified this feature I'm about to request hasn't been suggested before.

Describe the enhancement you want to request

Scoped auto-approval mode with expiry, a persistent risk indicator, and an audit trail — a user-facing "full-auto" that is explicit about what it does and what it does not do.

Related prior art (this request is a superset, not a duplicate): #51399 (documented full-auto mode), #38289 (persistent indicator), #41909 (/approve runtime toggle), #31137 / #49721 (the existing web auto-accept control is disabled under the new layout / does not respond), #47817 and #51504 (current auto-approve has cross-client and silent ask→allow degradation problems this design must avoid).

Today the web UI has auto-accept (permissions.autoaccept, mod+shift+a), but it is client-side only, session/directory-scoped, invisible while active, and has no expiry. What is missing is a deliberate, auditable escalation mode:

Requirements

API sketch

// consent record persisted server-side
type AutoApprovalGrant = {
  id: string
  scope: { session?: string; workspace?: string; tools?: string[] }
  createdAt: number
  expiresAt: number          // mandatory; no infinite grants
  createdBy: "web" | "tui"   // surface that granted it
}
// events: permission.grant.created / .expired / .revoked
// reply path: permission.reply gains an optional grantID for audit

Out of scope

Isolation. Users who need real containment still need a container/VM — the docs for this mode should say so explicitly.

Benefits

Repetitive approvals are the top friction point for supervised long-running sessions; doing this deliberately (scope + expiry + audit) instead of a silent "yolo" keeps the security posture honest and fixes the discoverability problem reported in #31137/#49721.

Related work — the auto-accept/auto-approve cluster

Existing surface the mode should build on: permissions.autoaccept command (mod+shift+a), per-session/directory autoAccept store (packages/app/src/context/permission.tsx, permission-auto-respond.ts), and server-side permission config / OPENCODE_PERMISSION env.

Ref State What it reports / fixes
#51399 open issue Documented, user-facing "full-auto" mode (Claude Code parity) — the headline request this one refines with scope/expiry/audit.
#38289 open issue Persistent indicator while auto-accept is active — adopted here as a hard requirement.
#41909 open issue /approve runtime toggle per session — the TUI-side equivalent.
#31137 open issue Web "Auto-accept permissions" button disabled when new layout is enabled — discoverability bug.
#45159 open issue New layout forcibly disables auto-accept.
#49721 open issue Web Settings auto-approve toggle silently does nothing on click/tap.
#49843 open PR Fix for #49721 — scopes the web toggle from the route directory.
#47320 open PR Auto-accept as an app-level saved setting (closes #37617).
#23586 open PR Restores the auto-accept button in the prompt input.
#46226 open PR Reflects global permission: allow in the Settings toggle.
#44608 / #48545 merged PRs App-level auto-accept setting; TUI session permission handling.
#51398 open issue Auto-approve not sticky across long runs — agent stalls unnoticed (TTL + indicator would surface this).
#47817 open issue TUI auto-approve approves permission requests from other clients on the same server — the grant model here explicitly prevents this.
#51504 open issue ask rules for MCP tools silently degrade to allow — this mode must not mask it.
#47177 / #50652 open issues Code-mode and plugin tools bypassing ask — same guardrail family.
#44007 / #48237 / #48579 / #48142 open issues Edge cases: --auto stalls background tabs; toggle disabled without session; sound spam; attach lacking --auto.

Triage note for maintainers

This is a frequently re-requested capability (#51399, #41909, #38289, plus the broken-toggle bug cluster above) and the current web surface is partially broken (#31137, #49721). A deliberate design (scope + expiry + audit + per-client isolation) would resolve the feature requests and the security-adjacent regressions (#47817, #51504) in one shape instead of five separate toggles.

No activity

Activity on this issue will appear here.

Activity

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions