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]: Wire the permission.ask plugin hook #22311
I have verified this feature I'm about to request hasn't been suggested before.
Describe the enhancement you want to request
The tool.execute.before hook can inspect and mutate tool args, or block execution by throwing, but it can't defer to the user for approval.
Without this, plugins that implement policy engines have no way to do "stop and ask", only hard-block or silent-allow.
Plugin-defined tools already get ask() via ToolContext, so the precedent exists.
The fix is small: pass ask on the hook's input object at the three trigger sites in prompt.ts, and extend the type in packages/plugin/src/index.ts.
Related to #19469 and #7006 but distinct, those wire the permission.ask hook to intercept existing permission checks; this exposes ask() on tool.execute.before so plugins can initiate permission requests.
If your request is distinct (exposing ask() on tool.execute.before rather than wiring permission.ask itself), please clarify the difference from the issues above so maintainers can assess whether a separate issue is needed.
If your request is distinct (exposing ask() on tool.execute.before rather than wiring permission.ask itself), please clarify the difference from the issues above so maintainers can assess whether a separate issue is needed.
This is distinct. #19469 and #7006 are about wiring the permission.ask hook so plugins can intercept existing permission checks. This is about exposing ask() on tool.execute.before so plugins can initiate new permission requests from the pre-tool interceptor. They're complementary.
Activity
github-actions commentedon Apr 13, 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 — same underlying gapIf your request is distinct (exposing
ask()ontool.execute.beforerather than wiringpermission.askitself), please clarify the difference from the issues above so maintainers can assess whether a separate issue is needed.jbro commentedon Apr 13, 2026
This is distinct. #19469 and #7006 are about wiring the
permission.askhook so plugins can intercept existing permission checks. This is about exposingask()ontool.execute.beforeso plugins can initiate new permission requests from the pre-tool interceptor. They're complementary.github-actions commentedon Jul 4, 2026
To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.