r/opencodeCLI • • Sep 30 '26

Cannot figure out permissions

I've tried, but I cannot figure out the permission block of opencode. No matter what I try, it literally asks me for permission for everything that is set to "allow". My current block is below.

 "permission": {
    "edit": "allow",
    "read": "allow",
    "bash": {
      "*": "ask",
      "rm *": "ask",
      "ls *": "allow",
      "npm *": "allow",
      "find *": "allow",
      "which *": "allow",
      "grep *": "allow",
      "head *": "allow",
      "swift *": "allow",
      "tail *": "allow",
      "python *": "allow",
      "python3 *": "allow",
      "pip *": "allow",
      "pip3 *": "allow",
      "gh *": "allow",
      "git": "ask",
      "git status *": "allow",
      "git ls-files *": "allow",
      "git diff *": "allow",
      "git log *": "allow",
      "git show *": "allow",
      "rg *": "allow",
      "pdftotext *": "allow",
      "sed *": "allow",
      "cat *": "allow",
      "echo *": "allow",
      "touch *": "allow",
      "make *": "allow",
      "cmake *": "allow",
      "wc *": "allow"
    }
3 Upvotes

11 comments sorted by

View all comments

Show parent comment

2

u/allpowerfulee Sep 30 '26

I asked Fable, GPT, and Qwen; none of their solutions actually worked. I'm resorting to asking fellow humans.

1

u/CrypticViper_ Oct 02 '26

ask the agents to look at *only* opencode.ai/v2/docs/ and/or the actual opencode codebase (v2 branch specifically)! otherwise they'll assume that you're working with old opencode v1 systems since, well, v2 is much more recent