Skip to content

[FEATURE]: Show only the specific permission rule responsible for a denied tool call #44521

Open

Description

@binarynoise

Feature hasn't been suggested before.

  • 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.

Activity

  1. binarynoise commented on Sep 15, 2026

    @binarynoise
    Author

    I get the feeling that the behaviour was changed to not include the rule set at all, is this correct?

  2. opencodejr commented on Oct 28, 2026

    @opencodejr
    Contributor

    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:

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