Feature Request: Granular Agent Tool Permission Controls #34475
Replies: 7 comments 1 reply
-
Duplicate of #30313? |
Beta Was this translation helpful? Give feedback.
-
There is definitely room for improvement/enhancement for how tool permissions are handled. I'm not sure whether simple text/regex/glob based rules are up to the task. The requirement for users to manually compose/test/modify these statements to control this feature raises some pretty clear UX concerns. There are also very real concerns with how to match pipelines, chained commands, file redirections, variable interpolation, shell script execution, etc. And for that I think we would need to actually parse all the commands (and support multiple shell dialects). I'm not sure the best path forward but would love to capture some of the prior art used by other editors. Thanks for reporting. |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
I haven't used other "art" that addresses this problem well, but I would really like to have a solution in Zed. Would it be possible to model a command as an array of strings (as passed to execve) rather than a string of shell commands (as passed to This may seem like a major constraint, but if the agent is going to have the command auto-approved, it could potentially combine commands itself (if command A files, run command B). Also, a user could write a wrapper script to perform common operations and supporting a small number of parameters, encapsulating things like |
Beta Was this translation helpful? Give feedback.
-
Alternatively, matching the full string with a small collection of regex-like macros might be adequate. For example, if the user is asked for permission to allow |
Beta Was this translation helpful? Give feedback.
-
One more idea that could work for more than just shell scripts: Instead of giving find-grain permissions for a particular category of tool (such as the ones that run shell commands), how about making it really easy for a user to create a very narrow custom tool that is implemented in terms of the original tool the model tried to use, and then always grant access to that specialized tool? For example, if the model tries to use the command tool to run Although the example is again with shell commands, the general idea could be applied to tools that do other things -- making HTTP requests, creating objects in a database, etc. The idea more decoupled from the specific shell command use-case. (If the user could open the specification for the parameter mapping in a Zed buffer, specified as markdown or yaml, then they could get an agent's help in refining and maintaining it.) |
Beta Was this translation helpful? Give feedback.
-
This is proving to be more necessary than anything to have in Zed. So both the rules need to be followed and passed to the LLM and we need tool level ACL. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Feature Request: Granular Agent Tool Permission Controls
Summary
Currently, Zed Editor provides an all-or-nothing approach to agent tool permissions where users can either:
Feature Request
I would like to request more granular control over the 'Always Allow' functionality, specifically:
1. Command-Specific Permissions
ls
,cat
,grep
)2. Tool-Specific Permissions
read_file
,write_file
)3. Pattern-Based Permissions
ping *
,npm install *
)4. Always Deny Rules
Use Cases
Developer Workflow
ls
,cat
,grep
,find
read_file
rm
,write_file
,terminal
with destructive commandsSecurity-Conscious Users
rm -rf
,sudo
,curl
to external siteshead
,tail
,wc
Productivity Enhancement
Suggested Implementation
UI Enhancements
Configuration File
Benefits
Related Issues
This builds upon the existing agent tool permission system and would enhance issues like:
Environment
Would love to hear thoughts from the community and maintainers on this feature request!
Beta Was this translation helpful? Give feedback.
All reactions