Skip to content

[FEATURE]: Tell permission replies and plugin RPCs whether a person or a tool sent them #62936

Open

Description

@olobarius

Feature hasn't been suggested before.

  • 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.

Related: #62689, #51599, #2242

Activity

  1. opencodejr commented on Nov 9, 2026

    @opencodejr

    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:

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