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]: Tell permission replies and plugin RPCs whether a person or a tool sent them #62936
I have verified this feature I'm about to request hasn't been suggested before.
Describe the enhancement you want to request
Any process of the user can call the local service with its stored credentials (opencode api finds them), the agent's own shell included. So a tool can answer a pending permission request (opencode api session.permission.reply …) or a plugin's dialog, and neither OpenCode nor the plugin can tell that no person answered.
I know the permission system is a UX feature, not a sandbox (SECURITY.md). This is about that UX: a prompt meant for the user should be answered by the user, or the answer should at least say where it came from.
Idea: mark requests from interactive clients (Desktop, paired browsers), pass that origin to plugin RPC handlers and to permission/form replies (also the hook in #62689), and optionally accept permission replies only from interactive clients.
Use case: my plugin asks before a stored password goes into a command. Today it can only pattern-match tool input to stop opencode api calls.
Thanks for the detailed request! You're asking for the server to record whether a request came from an interactive client (Desktop, a paired browser) or from some other local process using the stored credentials. That origin would then be passed to plugin RPC handlers and to permission/form replies, with an option to accept permission replies only from interactive clients. Maintainers will consider it.
I checked the current code: the context passed to plugin RPC handlers holds only the abort signal and the error helper, and permission replies carry nothing about where they came from. So a plugin can't do this yet; it would need a change to the plugin API.
Activity
opencodejr commentedon Nov 9, 2026
Thanks for the detailed request! You're asking for the server to record whether a request came from an interactive client (Desktop, a paired browser) or from some other local process using the stored credentials. That origin would then be passed to plugin RPC handlers and to permission/form replies, with an option to accept permission replies only from interactive clients. Maintainers will consider it.
I checked the current code: the context passed to plugin RPC handlers holds only the abort signal and the error helper, and permission replies carry nothing about where they came from. So a plugin can't do this yet; it would need a change to the plugin API.
Related issues:
permission.replyhook to adjust the decline message before the reply settles the request #62689: the proposedpermission.replyhook, where an origin field would fit naturally