anomalyco / anomalyco/opencode

[BUG] Always permission scope depends on request timing

Open
#46,357 0 comments 0 reactions 1 assignee View on GitHub

@kitlangton is already working on this.

Since Aug 31, 2026.

Dominant language
TypeScript
Stars
209k
Forks
27.5k
PR merge metrics
PR metrics pending

Description

Description

Selecting Always stores an approval rule in the instance-wide approved list, so future matching requests in any session are automatically allowed. However, requests that are already pending are reconsidered only when they belong to the session where Always was selected.

This makes identical requests behave differently solely because of timing: a matching request created before the approval can remain blocked in another session, while the same request created afterward is automatically approved there.

The approval scope should be consistent for pending and future requests. The safe scope also needs to be explicit, for example the originating session tree rather than every unrelated concurrent session.

Related: #42310 deliberately avoids approving requests from unrelated sessions in the run client.

Plugins

None required

OpenCode version

1.18.25 and current dev

Steps to reproduce
  1. Open two sessions in the same OpenCode instance with the same permission set to ask.
  2. Make a matching request pending in session B.
  3. Make the same request in session A and select Always.
  4. Observe that the existing request in B remains pending.
  5. Repeat with the request in B created after selecting Always in A.
  6. Observe that the later request in B is automatically approved.
Screenshot and/or share link

Not applicable

Operating System

macOS 26.6.2

Terminal

Not terminal-specific

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.