anomalyco / anomalyco/opencode
[BUG] Always permission scope depends on request timing
@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
- Open two sessions in the same OpenCode instance with the same permission set to ask.
- Make a matching request pending in session B.
- Make the same request in session A and select Always.
- Observe that the existing request in B remains pending.
- Repeat with the request in B created after selecting Always in A.
- 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.