Description
Problem
The PLAN agent categorically refuses to edit files or ask for permissions, even when the config explicitly sets "edit": "ask". This doesn't affect all models.
Root Cause
The system reminder in plan.txt contains an absolute forbid that overrides permissions.
I haven't reviewed the entire codebase, but this appears to be a likely explanation for why some models are prevented by the system's constraints to respect permissions.
Relevant code
Read reminder
https://github.com/sst/opencode/blob/f636d937c4d01fdbcf77d82664489933eca80ac4/packages/opencode/src/session/prompt/plan.txt#L1-L8
Build reminder
https://github.com/sst/opencode/blob/f636d937c4d01fdbcf77d82664489933eca80ac4/packages/opencode/src/session/prompt/build-switch.txt#L1-L5
Reminders logic
https://github.com/sst/opencode/blob/492bf51a0dfa4fd278337b6e75da807048d44ff1/packages/opencode/src/session/prompt.ts#L917-L944
OpenCode version
1.0.35
Steps to reproduce
Model: OpenCode Zen Grok Code Fast 1
Agent: PLAN
No custom config.
Adjusting permissions via config doesn't change the outcome as they are completely ignored.
This does not happen with all models.
Prompt
Create a TOOL.md listing all tools available to you.
Thinking
The user asked to "Create a TOOL.md listing all tools available to you." But there's a system reminder saying "CRITICAL: Plan mode ACTIVE - you are in READ-ONLY phase. STRICTLY FORBIDDEN: ANY file edits, modifications, or system changes." It says I may ONLY observe, analyze, and plan. Any modification attempt is a critical violation.
Screenshot and/or share link
No response
Operating System
macOS 26
Terminal
Ghostty
Description
Problem
The PLAN agent categorically refuses to edit files or ask for permissions, even when the config explicitly sets
"edit": "ask". This doesn't affect all models.Root Cause
The system reminder in plan.txt contains an absolute forbid that overrides permissions.
I haven't reviewed the entire codebase, but this appears to be a likely explanation for why some models are prevented by the system's constraints to respect permissions.
Relevant code
Read reminder
https://github.com/sst/opencode/blob/f636d937c4d01fdbcf77d82664489933eca80ac4/packages/opencode/src/session/prompt/plan.txt#L1-L8
Build reminder
https://github.com/sst/opencode/blob/f636d937c4d01fdbcf77d82664489933eca80ac4/packages/opencode/src/session/prompt/build-switch.txt#L1-L5
Reminders logic
https://github.com/sst/opencode/blob/492bf51a0dfa4fd278337b6e75da807048d44ff1/packages/opencode/src/session/prompt.ts#L917-L944
OpenCode version
1.0.35
Steps to reproduce
Model:
OpenCode Zen Grok Code Fast 1Agent:
PLANNo custom config.
Adjusting permissions via config doesn't change the outcome as they are completely ignored.
This does not happen with all models.
Prompt
Thinking
Screenshot and/or share link
No response
Operating System
macOS 26
Terminal
Ghostty