opencode icon indicating copy to clipboard operation
opencode copied to clipboard

BUG: Overriding built-in agents, doesn't allow overriding permissions

Open oribarilan opened this issue 2 months ago • 11 comments

Description

I am overriding the built-in agents (e.g., using agent/plan.md) which although not documented, it successfully catches my new prompt. However, I want this agent to be able to write markdown files, but even though i am properly setting permissions, agent qoutes:

"CRITICAL: Plan mode ACTIVE - you are in READ-ONLY phase. STRICTLY FORBIDDEN: ANY file edits, modifications, or system changes...

Expected behavior in my opinion is that if another definition of a plan agent exists, it should bypass the original plan agent entirely.

OpenCode version

0.15.29 (latest)

Steps to reproduce

  1. define plan.md agent
  2. give it write permissions (e.g., to a .md files, example below)
  3. give it a custom prompt
  4. ask it to generate a file and see your prompt is used but permissions are ignored

permission example:

permissions:
  write:
    ".plan/*": allow
    "*": deny
  edit:
    ".plan/*": allow
    "*": deny

Screenshot and/or share link

No response

Operating System

No response

Terminal

No response

oribarilan avatar Oct 30 '25 14:10 oribarilan