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
regression: permission.ask plugin hook dropped in Effect refactor (38e0dc9) #28066
The permission.ask plugin hook was accidentally dropped during the "Move service state into InstanceState" refactor in commit 38e0dc9 (Mar 20 2026). The hook was present and working from the initial plugin implementation (ca03127, Aug 2025) through the last pre-refactor commit (f015154), but the call site was not ported to the Effect-native rewrite.
The Plugin.trigger("permission.ask", ...) call is gone. Permission.ask now evaluates the ruleset and either returns silently (allow), throws DeniedError (deny), or publishes Event.Asked to the bus — but never calls the plugin hook. The type declaration in packages/plugin/src/index.ts line 260 still ships, so plugin authors write handlers that silently do nothing at runtime.
Impact
Any plugin registering permission.ask to auto-allow read-only commands — the documented use case for this hook — has been silently broken since v1.x March 2026. The hook is still declared in @opencode-ai/plugin types and referenced in no docs or examples that would surface the regression.
Suggested fix
Re-add the Plugin.trigger call in packages/opencode/src/permission/index.ts inside Permission.ask, before the bus.publish(Event.Asked, info) line:
// After needsAsk check, before publishing the ask event:constpluginResult=yield*Effect.promise(()=>Plugin.trigger("permission.ask",info,{status: "ask"asconst}))if(pluginResult.status==="allow")returnif(pluginResult.status==="deny")returnyield*newDeniedError(...)// existing: create pending + publish
The exact Effect-idiomatic form may differ — the point is restoring the call site that was present before the refactor.
The new issue adds context about the specific refactor commit (38e0dc9) that dropped the call site, which could help with the fix, but the underlying problem is the same one tracked in #7006.
Activity
github-actions commentedon May 17, 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 not triggered (open, same root cause — hook call site missing from the permission system)The new issue adds context about the specific refactor commit (
38e0dc9) that dropped the call site, which could help with the fix, but the underlying problem is the same one tracked in #7006.athal7 commentedon May 17, 2026
Duplicate of #7006. The fix is already in PR #19453 awaiting review. Adding the specific regressing commit (38e0dc9) to #7006 for context.