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
[FEATURE]: Let plugins check permissions without prompting #64787
I have verified this feature I'm about to request hasn't been suggested before.
Describe the enhancement you want to request
Let plugins check whether an action is already allowed without asking the user to approve it.
For example, a plugin might need to decide whether it can share information from a session. If sharing would need approval, the plugin can leave the information out. Just checking should never open an approval prompt.
The plugin API's permission.assert opens a prompt when the current rules require approval. OpenCode already has an internal check that answers this question without creating a request. Could the server plugin API expose that check as permission.allows in both the Effect and Promise APIs, so plugins can use the session's current permission rules?
To restate it: you'd like server plugins to get ctx.permission.allows(input) in both the Effect and Promise APIs. It would forward to the existing core check and return a yes/no answer without opening an approval request, with both ask and deny counting as no.
The code I read matches your description:
Core already has Permission.allows in packages/core/src/permission.ts. Its doc comment says: "True only when the rules already allow the request; never asks the user."
The plugin PermissionDomain in packages/plugin/src/effect/permission.ts exposes list, get, reply, hook and assert. The doc comment on assert says it prompts the user and waits for the reply when approval is required.
Since the method is missing from the plugin API itself, a plugin can't work around this. Maintainers will consider the request.
changed the title [-][FEATURE]: Expose the non-prompting permission check to server plugins[/-][+][FEATURE]: Let plugins check permissions without prompting[/+]on Nov 19, 2026
Activity
opencodejr commentedon Nov 19, 2026
Thanks for the detailed request, @iamichi!
To restate it: you'd like server plugins to get
ctx.permission.allows(input)in both the Effect and Promise APIs. It would forward to the existing core check and return a yes/no answer without opening an approval request, with both ask and deny counting as no.The code I read matches your description:
Permission.allowsinpackages/core/src/permission.ts. Its doc comment says: "True only when the rules already allow the request; never asks the user."PermissionDomaininpackages/plugin/src/effect/permission.tsexposeslist,get,reply,hookandassert. The doc comment onassertsays it prompts the user and waits for the reply when approval is required.Since the method is missing from the plugin API itself, a plugin can't work around this. Maintainers will consider the request.
Related:
[-][FEATURE]: Expose the non-prompting permission check to server plugins[/-][+][FEATURE]: Let plugins check permissions without prompting[/+]