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
OpenCode V2: bash operation refused because host does not provide a permission request endpoint #50584
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
Run OpenCode V2.
Load a V2-compatible plugin that uses the V2 plugin API.
Have the plugin invoke the bash operation.
When the operation requires permission, the host refuses it.
The following error is returned:
The "bash" operation was refused because the OpenCode V2 host did not provide a permission request endpoint.
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.
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
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.
Activity
github-actions commentedon Sep 22, 2026
This issue might be a duplicate of existing issues. Please check:
permission.askplugin hook is defined but not triggered #7006:permission.askplugin 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.
rekram1-node commentedon Oct 14, 2026
I think there is some confusion here..
Opencode v2 uses a
shelltool instead ofbash, 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
rekram1-node commentedon Oct 14, 2026
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 toassertinstead of looking for an HTTP endpoint. I'm closing this on our side, but feel free to point the plugin authors here.