PLAN agent specific permission #1968

Closed
opened 2026-02-16 17:33:29 -05:00 by yindo · 9 comments
Owner

Originally created by @sai-sy on GitHub (Oct 6, 2025).

Originally assigned to: @rekram1-node on GitHub.

I was wondering if there was an existing system to to give the PLAN AGENT permissions to rg, find, and grep. The permissions docs say that the agent begins with all permissions but you can get more granular, implying that it's referring the to build agent.

I'd like the plan agent to always be able to use rg and grep and find so I don't have to stay by it and give it "always" access on any given instance

{
  "$schema": "https://opencode.ai/config.json",
  "permission": {
    "bash": {
      "rg *": "allow",
      "grep *": "allow",
      " *": "allow"
    }
  }
}
Originally created by @sai-sy on GitHub (Oct 6, 2025). Originally assigned to: @rekram1-node on GitHub. I was wondering if there was an existing system to to give the PLAN AGENT permissions to `rg`, `find`, and `grep`. The [permissions docs](https://opencode.ai/docs/permissions) say that the agent begins with all permissions but you can get more granular, implying that it's referring the to build agent. I'd like the plan agent to always be able to use rg and grep and find so I don't have to stay by it and give it "always" access on any given instance ```opencode.json { "$schema": "https://opencode.ai/config.json", "permission": { "bash": { "rg *": "allow", "grep *": "allow", " *": "allow" } } } ```
yindo closed this issue 2026-02-16 17:33:29 -05:00
Author
Owner

@rekram1-node commented on GitHub (Oct 6, 2025):

@sai-sy the config you provided will override the permissions of all agents for bash including plan, if you instead wish to specifically alter plan and nothing else, you can do (you can do this for any agent, and you can override whatever part you want, for list of available options see https://opencode.ai/config.json:

{
  "$schema": "https://opencode.ai/config.json",
  "agent": {
    "plan": {
      "permission": {
        "bash": {
          "echo *": "allow"
        }
      }
    }
  }
}
@rekram1-node commented on GitHub (Oct 6, 2025): @sai-sy the config you provided will override the permissions of all agents for bash including plan, if you instead wish to specifically alter plan and nothing else, you can do (you can do this for any agent, and you can override whatever part you want, for list of available options see https://opencode.ai/config.json: ``` { "$schema": "https://opencode.ai/config.json", "agent": { "plan": { "permission": { "bash": { "echo *": "allow" } } } } } ```
Author
Owner

@sai-sy commented on GitHub (Oct 7, 2025):

Then perhaps my opencode just isn't reading from my .config/opencode/opencode.json

Is there some extra step not outlined in the docs?

@sai-sy commented on GitHub (Oct 7, 2025): Then perhaps my opencode just isn't reading from my `.config/opencode/opencode.json` Is there some extra step not outlined in the docs?
Author
Owner

@rekram1-node commented on GitHub (Oct 7, 2025):

@sai-sy run opencode debug config lets see what it says?

@rekram1-node commented on GitHub (Oct 7, 2025): @sai-sy run `opencode debug config` lets see what it says?
Author
Owner

@sai-sy commented on GitHub (Oct 7, 2025):

Huh weird it finds the config yet it asked for permission to run rg * or
grep * or find *

Maybe when I did this last night I didn’t restart opencode. Thanks for the
help I suspect if I ran open code now it would work. I’ll be back later if
it doesn’t. thank you


Thanks!
He/Him
Saihaan "Sai" Syed

On Tue, Oct 7, 2025 at 12:13 AM Aiden Cline @.***>
wrote:

rekram1-node left a comment (sst/opencode#2989)
https://github.com/sst/opencode/issues/2989#issuecomment-3375124439

@sai-sy https://github.com/sai-sy run opencode debug config lets see
what it says?


Reply to this email directly, view it on GitHub
https://github.com/sst/opencode/issues/2989#issuecomment-3375124439, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/AR3GQZL5IUJTRNNR4ZQGNDL3WM4UZAVCNFSM6AAAAACIMDRBTCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTGNZVGEZDINBTHE
.
You are receiving this because you were mentioned.Message ID:
@.***>

@sai-sy commented on GitHub (Oct 7, 2025): Huh weird it finds the config yet it asked for permission to run rg * or grep * or find * Maybe when I did this last night I didn’t restart opencode. Thanks for the help I suspect if I ran open code now it would work. I’ll be back later if it doesn’t. thank you --- Thanks! He/Him Saihaan "Sai" Syed On Tue, Oct 7, 2025 at 12:13 AM Aiden Cline ***@***.***> wrote: > *rekram1-node* left a comment (sst/opencode#2989) > <https://github.com/sst/opencode/issues/2989#issuecomment-3375124439> > > @sai-sy <https://github.com/sai-sy> run opencode debug config lets see > what it says? > > — > Reply to this email directly, view it on GitHub > <https://github.com/sst/opencode/issues/2989#issuecomment-3375124439>, or > unsubscribe > <https://github.com/notifications/unsubscribe-auth/AR3GQZL5IUJTRNNR4ZQGNDL3WM4UZAVCNFSM6AAAAACIMDRBTCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTGNZVGEZDINBTHE> > . > You are receiving this because you were mentioned.Message ID: > ***@***.***> >
Author
Owner

@rekram1-node commented on GitHub (Oct 7, 2025):

sounds good yeah definitely need to restart lmk if u have more problems

@rekram1-node commented on GitHub (Oct 7, 2025): sounds good yeah definitely need to restart lmk if u have more problems
Author
Owner

@sai-sy commented on GitHub (Oct 7, 2025):

@sai-sy the config you provided will override the permissions of all agents for bash including plan, if you instead wish to specifically alter plan and nothing else, you can do (you can do this for any agent, and you can override whatever part you want, for list of available options see https://opencode.ai/config.json:

{
  "$schema": "https://opencode.ai/config.json",
  "agent": {
    "plan": {
      "permission": {
        "bash": {
          "echo *": "allow"
        }
      }
    }
  }
}

Should this example or any example highlighting the ability to target specifically plan or build agent not be included in the permissions page on the docs. I see that it's mentioned in the config/#agents section but just including this example might help people

@sai-sy commented on GitHub (Oct 7, 2025): > [@sai-sy](https://github.com/sai-sy) the config you provided will override the permissions of all agents for bash including plan, if you instead wish to specifically alter plan and nothing else, you can do (you can do this for any agent, and you can override whatever part you want, for list of available options see https://opencode.ai/config.json: > > ``` > { > "$schema": "https://opencode.ai/config.json", > "agent": { > "plan": { > "permission": { > "bash": { > "echo *": "allow" > } > } > } > } > } > ``` Should this example or any example highlighting the ability to target specifically plan or build agent not be included in the [permissions page on the docs](https://github.com/sst/opencode/issues/2989#issuecomment-3371742468). I see that it's mentioned in the [config/#agents](https://opencode.ai/docs/config/#agents) section but just including this example might help people
Author
Owner

@rekram1-node commented on GitHub (Oct 7, 2025):

yeah we probably should

@rekram1-node commented on GitHub (Oct 7, 2025): yeah we probably should
Author
Owner

@sai-sy commented on GitHub (Oct 7, 2025):

@rekram1-node the doc site itself isn't on GH for me to go quickly change?

@sai-sy commented on GitHub (Oct 7, 2025): @rekram1-node the doc site itself isn't on GH for me to go quickly change?
Author
Owner
@sai-sy commented on GitHub (Oct 7, 2025): ah nvm https://github.com/sst/opencode/blob/dev/packages/web/src/content/docs/permissions.mdx
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#1968