GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — permissions: add time-limited approvals (30m/1h/3h/5h/1d/1w) between once and always · Issue #61465 · anomalyco/opencode

permissions: add time-limited approvals (30m/1h/3h/5h/1d/1w) between once and always #61465

New issue
Copy link
New issue
Copy link
Open
Open
permissions: add time-limited approvals (30m/1h/3h/5h/1d/1w) between once and always#61465
Copy link

Description

@elviswong1013
elviswong1013
opened on Nov 3, 2026
Issue body actions

Summary

The permission prompt only offers once, always, and reject. always writes a durable project-scoped allow rule, so allowing a temporary directory (or any one-off path) for a short while forces a choice between "once" (re-prompts on every call) and "forever" (a permanent rule the user must remember to clean up). Add time-limited approvals as a middle ground: 30m, 1h, 3h, 5h, 1d, 1w.

Environment

  • opencode version: 2.0.23
  • OS: Windows 11 (Windows_NT 10.0.26200.9711)
  • Terminal: desktop app (GUI); terminal environment not applicable
  • Shell: C:\WINDOWS\system32\cmd.exe (PowerShell for tooling)
  • Install/channel: release, v2.0.23
  • Active plugins: [email protected], pty-plugin (local), @plannotator/[email protected], [email protected], opencode-tavily, @firecrawl/[email protected], @cheesecodestudio/opencode-tokenscope-v2, local timed-permissions plugin

Reproduction

  1. In a session (or a subagent), read a file outside the project directory, e.g. C:/Users/me/AppData/Local/Temp/opencode/object-counting-002/count-anything/x.png.
  2. The permission prompt appears with only 拒絕 / 永遠允許 / 允許一次 (reject / always / once).

Expected Behavior

The prompt offers a duration: once, 30m, 1h, 3h, 5h, 1d, 1w, always. always can remain, optionally behind a secondary confirmation.

Actual Behavior

Only once / always / reject. always saves a permanent project-scoped allow rule with no expiration or in-flow revocation.

Additional Context

  • Docs (https://opencode.ai/v2/docs/permissions/): clients reply once, always, reject; saved approvals from always are durable, project-scoped allow rules. No time-limited option is documented.
  • Policies have no expiration either (https://opencode.ai/v2/docs/policies/).
  • The GUI plugin API (experimental, https://opencode.ai/v2/docs/build/plugins/gui/) has no permission-dialog extension point, so a plugin cannot add these options to the native prompt; this needs a core UI + permission-store change.
  • Implementation sketch: store expiresAt on saved approvals, filter expired entries before evaluation, and expose them through /api/permission/saved so a future settings UI can list and revoke them. The permission.evaluate plugin hook already allows programmatic relaxation, but there is no way for a user to express the duration in the prompt.
  • Screenshot of the current prompt available on request (Windows desktop app, Chinese locale).

Activity

  1. opencodejr commented on Nov 3, 2026

    @opencodejr
    opencodejrBot
    on Nov 3, 2026
    Contributor
    More actions

    Thanks for the detailed write-up, @elviswong1013! You'd like the permission prompt to let you approve something for a limited time (30m, 1h, 3h, 5h, 1d, 1w) as a middle ground between Allow once and Always allow, so short-term access, like a temp directory outside the project, doesn't leave a permanent project-wide rule behind.

    Right now v2 offers only once, always and reject, and Always allow saves a permanent rule for the project, so this would be a new feature. As you noted, a plugin can't add options to the built-in prompt, and replies have no way to carry a duration, so this needs a change in OpenCode itself. The maintainers will consider it.

    Related issues:

    • [FEATURE]: scoped auto-approval mode with expiry, persistent risk indicator and audit trail #51859: a broader auto-approval mode that includes an expiry
    • permissions: allow-always is durable and project-scoped with no opt-out or TUI reset #50600: approvals that last only for the current session instead of being saved for the project
    • [FEATURE]: Add more granular command approval options for project and global persistence #59623: more ways to choose how long an approval lasts (session, project, global)
    • permissions: V2 “Always allow” silently overrides configured “ask” across future project sessions #48456: saved Always allow rules persist and override configured ask rules
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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402775 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.