[FEATURE] Configurable suggestions for denied commands

Status Open
Maintainer reply None cached
Activity 0 comments · opened Jul 21, 2026

Preflight Checklist

  • [x] I have searched existing requests and this feature hasn't been requested yet
  • [x] This is a single feature request (not multiple features)

Problem Statement

To try and let Claude be more autonomous without resorting to YOLO mode, I often have it write tools for itself with narrow uses which can be safely blanket-approved. Unfortunately it often forgets to use them over time, and the memory system does nothing to really improve this. LLMs just want to go back to doing what they've been trained to do as their attention degrades.

The most effective solution I've found is to write PreToolUse hooks which detect this and auto-deny the tool call with a suggestion for what to do instead. This mostly works at steering Claude automatically back onto the patters I want it to follow, but does take some bespoke code.

Proposed Solution

It would be very convenient if the permission system itself in settings.json included some way to include a suggestion that Claude will see when it matches a tool in permissions.deny[]. Something like this maybe:

{
    "permissions": {
        "deny": [
             {
                    "pattern": "Bash(some-really-easily-abused-coreutil *)",
                    "reason": "Use ./script/pre-approved-script-that-doesnt-let-you-blow-up-my-pc.sh instead"
             }
        ]
    }
}

Alternative Solutions

I'm currently using the bespoke hooks workaround I mentioned.

Priority

Medium - Would be very helpful

Feature Category

Configuration and settings

Use Case Example

The world of software is full of ubiquitous tools that are powerful but sharp. In the past, we could expect humans to have their own best interests in mind while using them. Now these tools, which are unfortunately an integral part of modern software development, can be used by a misaligned or confused agent to easily harm you.

Take grep and rg, for example. rg has features which let it run arbitrary commands. grep (AFAIK) does not. Guess which one Claude is allowed to use out of the box?

Additional Context

_No response_

View original on GitHub ↗