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]: Show only the specific permission rule responsible for a denied tool call #44521
I have verified this feature I'm about to request hasn't been suggested before.
Describe the enhancement you want to request
Sometimes the agent tries to run a bash command that is denied. Often that command is buried within a chain of other commands so it is not obvious which command triggered the denial. The agent then goes speculating and most often comes to the wrong conclusion.
We should only tell it the specific rule it violated that is responsible for denying the tool call and not dump the full (lengthy) list of all rules that are currently active.
"The user has specified a rule which prevents you from using this specific tool call. Here are some of the relevant rules" even implies that what follows is only the relevant subset of rules that apply to the executed command, not a just blindly dumped list of everything.
One other side effect of that which would get fixed is that it sees {"permission":"bash","pattern":"*","action":"ask"} and gets frightened to do anything.
The denial message should explain the decision that was made, not expose the entire configuration from which the decision was derived.
This way, we can help the agent fix the (bash) command and not give up frustrated.
Thanks for the request, @binarynoise! You're asking that when a tool call is denied, the model is told only the rule that blocked it, and for chained shell commands which part was blocked, instead of being shown the whole active ruleset.
To answer your comment: yes, this changed in v2. The text you quoted ("…Here are some of the relevant rules") comes from v1. In v2 the denial no longer lists the ruleset. The model just gets Permission denied: <tool> (for example Permission denied: shell). That avoids the frightening * ask dump, but it still doesn't name the matched rule or the command segment it matched, so the problem you describe is still there.
This can't be done as a plugin right now, because calls that config rules deny are blocked before the permission plugin hook runs. Maintainers will consider it. Related issues:
Activity
binarynoise commentedon Sep 15, 2026
I get the feeling that the behaviour was changed to not include the rule set at all, is this correct?
opencodejr commentedon Oct 28, 2026
Thanks for the request, @binarynoise! You're asking that when a tool call is denied, the model is told only the rule that blocked it, and for chained shell commands which part was blocked, instead of being shown the whole active ruleset.
To answer your comment: yes, this changed in v2. The text you quoted ("…Here are some of the relevant rules") comes from v1. In v2 the denial no longer lists the ruleset. The model just gets
Permission denied: <tool>(for examplePermission denied: shell). That avoids the frightening* askdump, but it still doesn't name the matched rule or the command segment it matched, so the problem you describe is still there.This can't be done as a plugin right now, because calls that config rules deny are blocked before the permission plugin hook runs. Maintainers will consider it. Related issues: