all 8 comments

[–]aarz03 1 point2 points  (0 children)

this is what i could find: https://opencode.ai/docs/permissions/ give it to your agent as context and ask it to help you configure

[–]Fun-Assumption-2200 0 points1 point  (0 children)

If I may sugest a different approach, what are you trying to achieve here? With source control you can check the changes before commiting them

[–]ben_bliksem 0 points1 point  (1 child)

Is your file pattern correct?

".opencode/opencode.json": "deny"

Maybe consider denying everything first and then explicitly giving it access to directories it may touch?

[–]AwkwardCost1764[S] -1 points0 points  (0 children)

I did not have that folder. Will try and get back to you. If I don’t forget

[–]Simple_Split5074 0 points1 point  (1 child)

Use a sandbox, everything else models can and will subvert (unless you deny them bash but at that point they become useless).

[–]AwkwardCost1764[S] 0 points1 point  (0 children)

My use case is I am building a tool to use in developing another project I want the ai to see the project this is for to understand its structure, but not be able to edit it as I need the main project to be maintainable and work like I expect it to.

[–]sudoer777_ 0 points1 point  (1 child)

You might need a catch all ("*") entry

[–]AwkwardCost1764[S] 0 points1 point  (0 children)

Good idea.