opencode icon indicating copy to clipboard operation
opencode copied to clipboard

[FEATURE]: Limit tool (e.g. write, edit) permissions to specific folders

Open driebe opened this issue 3 weeks ago • 2 comments

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

Hi opencode team,

I love your product and have a suggestion on how to improve secure interaction with the agents. It would be great if some of the tools (primarily write & edit) could be limited to certain project folders in the project.

For example: I want to limit my tester.md to only be able to create files in my ____tests_____ folders or edit files which have test in the filename - but no other files.

This could potentially look like this:

permission:
  write:
    "*/*test*": allow
    "*": deny
  edit:
    "*/*test*": allow
    "*": deny

Thanks for your consideration!

driebe avatar Dec 28 '25 22:12 driebe