Skip to content

PLAN agent specific permission #2989

Closed

Description

@sai-sy

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"
    }
  }
}

Activity

  1. self-assigned this
    on Oct 6, 2025
  2. rekram1-node commented on Oct 6, 2025

    @rekram1-node
    Collaborator

    @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"
            }
          }
        }
      }
    }
    
  3. sai-sy commented on Oct 7, 2025

    @sai-sy
    ContributorAuthor

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

    Is there some extra step not outlined in the docs?

  4. rekram1-node commented on Oct 7, 2025

    @rekram1-node
    Collaborator

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

  5. sai-sy commented on Oct 7, 2025

    @sai-sy
    ContributorAuthor
  6. rekram1-node commented on Oct 7, 2025

    @rekram1-node
    Collaborator

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

  7. sai-sy commented on Oct 7, 2025

    @sai-sy
    ContributorAuthor

    @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

  8. rekram1-node commented on Oct 7, 2025

    @rekram1-node
    Collaborator

    yeah we probably should

  9. sai-sy commented on Oct 7, 2025

    @sai-sy
    ContributorAuthor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions