The user has specifically restricted access to this command #1494

Closed
opened 2026-02-16 17:31:14 -05:00 by yindo · 2 comments
Owner

Originally created by @luukholleman on GitHub (Aug 26, 2025).

My plan agent is not allowed to use bash commands I gave it access to. The configuration in the error message actually states that it should work AFAIK. Is this related to #1965?

Shell Find taxonomy test project files

$ find Test/Taxonomy -name "*.csproj"

Error: The user has specifically restricted access to this command, you are not allowed to execute it. Here is the configuration: {"*":"deny","cat":"allow","more":"allow","less":"allow","head":"allow","tail":"allow","grep":"allow","awk":"allow","sed":"allow","find":"allow","ls":"allow","dotnet build":"allow","dotnet test":"allow"}
Shell List taxonomy test directories

$ ls -la Test/Taxonomy/

Error: The user has specifically restricted access to this command, you are not allowed to execute it. Here is the configuration: {"*":"deny","cat":"allow","more":"allow","less":"allow","head":"allow","tail":"allow","grep":"allow","awk":"allow","sed":"allow","find":"allow","ls":"allow","dotnet build":"allow","dotnet test":"allow"}
Shell Test taxonomy application tests without building

$ dotnet test REDACTED --no-build --verbosity quiet

Error: The user has specifically restricted access to this command, you are not allowed to execute it. Here is the configuration: {"*":"deny","cat":"allow","more":"allow","less":"allow","head":"allow","tail":"allow","grep":"allow","awk":"allow","sed":"allow","find":"allow","ls":"allow","dotnet build":"allow","dotnet test":"allow"}

This is my plan agent configuration

      "plan": {
         "mode": "primary",
         "model": "github-copilot/claude-sonnet-4",
         "temperature": 0.6,
         "tools": {
            "write": false,
            "edit": false,
            "bash": true
         },
         "permission": {
            "bash": {
               "*": "deny",
               // Allow read only actions
               "cat": "allow",
               "more": "allow",
               "less": "allow",
               "head": "allow",
               "tail": "allow",
               "grep": "allow",
               "awk": "allow",
               "sed": "allow",
               "find": "allow",
               "ls": "allow",
               "echo": "allow",
               "dotnet build": "allow",
               "dotnet test": "allow"
            },
            "webfetch": "ask",
            "edit": "deny"
         }
      }
Originally created by @luukholleman on GitHub (Aug 26, 2025). My plan agent is not allowed to use bash commands I gave it access to. The configuration in the error message actually states that it should work AFAIK. Is this related to #1965? ``` Shell Find taxonomy test project files $ find Test/Taxonomy -name "*.csproj" Error: The user has specifically restricted access to this command, you are not allowed to execute it. Here is the configuration: {"*":"deny","cat":"allow","more":"allow","less":"allow","head":"allow","tail":"allow","grep":"allow","awk":"allow","sed":"allow","find":"allow","ls":"allow","dotnet build":"allow","dotnet test":"allow"} ``` ``` Shell List taxonomy test directories $ ls -la Test/Taxonomy/ Error: The user has specifically restricted access to this command, you are not allowed to execute it. Here is the configuration: {"*":"deny","cat":"allow","more":"allow","less":"allow","head":"allow","tail":"allow","grep":"allow","awk":"allow","sed":"allow","find":"allow","ls":"allow","dotnet build":"allow","dotnet test":"allow"} ``` ``` Shell Test taxonomy application tests without building $ dotnet test REDACTED --no-build --verbosity quiet Error: The user has specifically restricted access to this command, you are not allowed to execute it. Here is the configuration: {"*":"deny","cat":"allow","more":"allow","less":"allow","head":"allow","tail":"allow","grep":"allow","awk":"allow","sed":"allow","find":"allow","ls":"allow","dotnet build":"allow","dotnet test":"allow"} ``` This is my plan agent configuration ``` "plan": { "mode": "primary", "model": "github-copilot/claude-sonnet-4", "temperature": 0.6, "tools": { "write": false, "edit": false, "bash": true }, "permission": { "bash": { "*": "deny", // Allow read only actions "cat": "allow", "more": "allow", "less": "allow", "head": "allow", "tail": "allow", "grep": "allow", "awk": "allow", "sed": "allow", "find": "allow", "ls": "allow", "echo": "allow", "dotnet build": "allow", "dotnet test": "allow" }, "webfetch": "ask", "edit": "deny" } } ```
yindo closed this issue 2026-02-16 17:31:14 -05:00
Author
Owner

@rekram1-node commented on GitHub (Aug 26, 2025):

@luukholleman your commands should be wildcarded, so instead of “cat” do “cat *”

@rekram1-node commented on GitHub (Aug 26, 2025): @luukholleman your commands should be wildcarded, so instead of “cat” do “cat *”
Author
Owner

@rekram1-node commented on GitHub (Aug 26, 2025):

also you don't have to worry about the "*" allowing && chains, here is an example:

Shell Display README.md contents then print hello

$ cat README.md && echo hello

Error: The user has specifically restricted access to this command, you are not allowed to execute it. 
Here is the configuration: {"*":"deny","cat *":"allow"}

In this case the command was blocked, but if the LLM just did cat README.md it is allowed

@rekram1-node commented on GitHub (Aug 26, 2025): also you don't have to worry about the "*" allowing && chains, here is an example: ``` Shell Display README.md contents then print hello $ cat README.md && echo hello Error: The user has specifically restricted access to this command, you are not allowed to execute it. Here is the configuration: {"*":"deny","cat *":"allow"} ``` In this case the command was blocked, but if the LLM just did `cat README.md` it is allowed
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#1494