Skip to content

OpenCode V2: bash operation refused because host does not provide a permission request endpoint #50584

Closed

Description

@FrancoStino

Description

OpenCode V2 refuses a bash operation with the following error:

The "bash" operation was refused because the OpenCode V2 host did not provide a permission request endpoint.

This happens when a plugin/tool running against the OpenCode V2 plugin API attempts to execute a shell operation that requires permission.

The issue appears to be in the OpenCode V2 host/API rather than in the plugin itself: the V2 host does not expose a permission request endpoint that the operation can use to ask the user for authorization.

Plugins

Oh my openagent, AFT, Ponytail

OpenCode version

2.0.x

Steps to reproduce

  1. Run OpenCode V2.
  2. Load a V2-compatible plugin that uses the V2 plugin API.
  3. Have the plugin invoke the bash operation.
  4. When the operation requires permission, the host refuses it.
  5. The following error is returned:
The "bash" operation was refused because the OpenCode V2 host did not provide a permission request endpoint.

Screenshot and/or share link

No response

Operating System

Linux

Terminal

Warp Terminal

Activity

  1. github-actions commented on Sep 22, 2026

    @github-actions
    Contributor

    This issue might be a duplicate of existing issues. Please check:

    • permission.ask plugin hook is defined but not triggered #7006: permission.ask plugin hook is defined but never triggered — the permission system goes directly to the UI without allowing plugins to intercept, which appears to be the same root cause as this report (V2 host not exposing a permission request endpoint for plugins)

    Please review that issue and confirm whether it covers your case. If it does, consider closing this one and adding any additional context there.

  2. rekram1-node commented on Oct 14, 2026

    @rekram1-node
    Collaborator

    I think there is some confusion here..

    Opencode v2 uses a shell tool instead of bash, also in the next version permission assertions are available in plugins via:
    ctx.permission.assert see here

    If you can provide more info based off the plugins ur using it may help debug

  3. rekram1-node commented on Oct 14, 2026

    @rekram1-node
    Collaborator

    As of v2.0.29, plugins can ask for permission in-process with ctx.permission.assert (#54930), which uses the normal prompt and permission rules. The error you saw comes from the plugin, so it should go away once the plugin switches to assert instead of looking for an HTTP endpoint. I'm closing this on our side, but feel free to point the plugin authors here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

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