[FEATURE]: edit/write permission with deny,allow,ask using glob #2832

Open
opened 2026-02-16 17:37:26 -05:00 by yindo · 8 comments
Owner

Originally created by @AceCodePt on GitHub (Nov 13, 2025).

Originally assigned to: @thdxr on GitHub.

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

Maybe allow certain agents to edit specific files would be helpful for documentation agents.

Originally created by @AceCodePt on GitHub (Nov 13, 2025). Originally assigned to: @thdxr on GitHub. ### Feature hasn't been suggested before. - [x] I have verified this feature I'm about to request hasn't been suggested before. ### Describe the enhancement you want to request Maybe allow certain agents to edit specific files would be helpful for documentation agents.
yindo added the discussion label 2026-02-16 17:37:26 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Nov 13, 2025):

This issue might be a duplicate of existing issues. Please check:

  • #3575: Similar request for agent-specific file permissions, includes examples of permission syntax with glob patterns for documentation use cases
  • #3991: Related issue about agents not respecting edit permissions configuration
  • #2208: Feature request for external permission file references to make agent permissions more manageable

Feel free to ignore if none of these address your specific case.

@github-actions[bot] commented on GitHub (Nov 13, 2025): This issue might be a duplicate of existing issues. Please check: - #3575: Similar request for agent-specific file permissions, includes examples of permission syntax with glob patterns for documentation use cases - #3991: Related issue about agents not respecting edit permissions configuration - #2208: Feature request for external permission file references to make agent permissions more manageable Feel free to ignore if none of these address your specific case.
Author
Owner

@AceCodePt commented on GitHub (Nov 13, 2025):

The first one is the closest. Though in my case I wasn't able to limit the agents permissions to just *.md

@AceCodePt commented on GitHub (Nov 13, 2025): The first one is the closest. Though in my case I wasn't able to limit the agents permissions to just *.md
Author
Owner

@iamhenry commented on GitHub (Nov 13, 2025):

The ability for my planning agent just to edit markdown files would be useful

@iamhenry commented on GitHub (Nov 13, 2025): The ability for my planning agent just to edit markdown files would be useful
Author
Owner

@rekram1-node commented on GitHub (Nov 13, 2025):

Yeah we definitely wanna do this

@rekram1-node commented on GitHub (Nov 13, 2025): Yeah we definitely wanna do this
Author
Owner

@redtux commented on GitHub (Nov 22, 2025):

Does it depend on the used LLM provider or model if this is being respected? Sometimes I'm being told "I'm in read-only mode and can't edit", but sometimes the agent just starts working. Often it even starts to implement the plan without asking me for approval, while other times it tells me that the task tool can't be used in plan mode, and so on.

@redtux commented on GitHub (Nov 22, 2025): Does it depend on the used LLM provider or model if this is being respected? Sometimes I'm being told "I'm in read-only mode and can't edit", but sometimes the agent just starts working. Often it even starts to implement the plan without asking me for approval, while other times it tells me that the task tool can't be used in plan mode, and so on.
Author
Owner

@rekram1-node commented on GitHub (Nov 22, 2025):

@redtux if you are using plan agent it will say its in read only mode, you can hit tab to change agents. But also the plan agent isn't that great we are improving it soon

@rekram1-node commented on GitHub (Nov 22, 2025): @redtux if you are using plan agent it will say its in read only mode, you can hit tab to change agents. But also the plan agent isn't that great we are improving it soon
Author
Owner

@redtux commented on GitHub (Nov 22, 2025):

Well, it seems to depend 😃 I tried again in a fresh session (and using the most recent version) after asking my question here, and it did commit, move files, and other operations (without being instructed to do so). Only after explicitly being asked to edit a file the agent told me that it's in read-only mode. So lessons learned: 1. it doesn't depend on the model (I didn't switch the model), 2. it is being reminded that it's in plan mode when trying to call a tool, 3. I better not trust that plan mode is strictly read-only. It also tried commands that are in the deny list in my settings. Here at least the CLI tells the agent that it's not allowed to run this command, but I would expect the agent not even trying to run that command in plan mode (mv, rm, git reset, git checkout, edit files using bash/sed/pipe, etc.) But thanks for the explanation, now at least I seem to understand how it's expected to work. 👍

@redtux commented on GitHub (Nov 22, 2025): Well, it seems to depend 😃 I tried again in a fresh session (and using the most recent version) after asking my question here, and it did commit, move files, and other operations (without being instructed to do so). Only after explicitly being asked to edit a file the agent told me that it's in read-only mode. So lessons learned: 1. it doesn't depend on the model (I didn't switch the model), 2. it is being reminded that it's in plan mode when trying to call a tool, 3. I better not trust that plan mode is strictly read-only. It also tried commands that are in the deny list in my settings. Here at least the CLI tells the agent that it's not allowed to run this command, but I would expect the agent not even trying to run that command in plan mode (mv, rm, git reset, git checkout, edit files using bash/sed/pipe, etc.) But thanks for the explanation, now at least I seem to understand how it's expected to work. 👍
Author
Owner

@AceCodePt commented on GitHub (Jan 2, 2026):

Amazing!
Thank you so much.

On Fri, Jan 2, 2026, 02:24 Ramiro Rivera @.***> wrote:

ramarivera left a comment (sst/opencode#4287)
https://github.com/sst/opencode/issues/4287#issuecomment-3704265589

This feature has been implemented in the codebase. The permission system
now supports pattern-based file permissions for edit, write, read tools
using glob patterns like { ".env": "deny", ".md": "allow", "*": "ask" }.


Reply to this email directly, view it on GitHub
https://github.com/sst/opencode/issues/4287#issuecomment-3704265589, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/AET7AOHJJDIVM5REZ66NQ734EW3E5AVCNFSM6AAAAACL75JAQKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTOMBUGI3DKNJYHE
.
You are receiving this because you authored the thread.Message ID:
@.***>

@AceCodePt commented on GitHub (Jan 2, 2026): Amazing! Thank you so much. On Fri, Jan 2, 2026, 02:24 Ramiro Rivera ***@***.***> wrote: > *ramarivera* left a comment (sst/opencode#4287) > <https://github.com/sst/opencode/issues/4287#issuecomment-3704265589> > > This feature has been implemented in the codebase. The permission system > now supports pattern-based file permissions for edit, write, read tools > using glob patterns like { "*.env": "deny", "*.md": "allow", "*": "ask" }. > > — > Reply to this email directly, view it on GitHub > <https://github.com/sst/opencode/issues/4287#issuecomment-3704265589>, or > unsubscribe > <https://github.com/notifications/unsubscribe-auth/AET7AOHJJDIVM5REZ66NQ734EW3E5AVCNFSM6AAAAACL75JAQKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTOMBUGI3DKNJYHE> > . > You are receiving this because you authored the thread.Message ID: > ***@***.***> >
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#2832