Repository navigation
[FEATURE]: Allow disabling or customizing Plan mode's hardcoded READ-ONLY system reminder #14882
Description
Feature Request
Problem
When customizing Plan mode via opencode.json to allow edits to specific directories, the hardcoded system reminder in prompt/plan.txt creates conflicting instructions for the model.
The current Plan mode injects this reminder (from src/session/prompt.ts:1206-1214):
CRITICAL: Plan mode ACTIVE - you are in READ-ONLY phase. STRICTLY FORBIDDEN:
ANY file edits, modifications, or system changes...
This ABSOLUTE CONSTRAINT overrides ALL other instructions...
ZERO exceptions.
This reminder is injected regardless of any permission configuration, making it impossible to create a Plan mode that can write to specific directories.
Use Case
We want Plan mode to create structured plans in a dedicated .mycompany/plans/ directory. Our configuration:
{
"agent": {
"plan": {
"prompt": "{file:.opencode/prompts/plan-mode.md}",
"permission": {
"edit": {
"*": "ask",
".mycompany/*": "allow",
"*.md": "allow"
},
"write": {
"*": "ask",
".mycompany/*": "allow",
"*.md": "allow"
}
}
}
}
}The permissions are correctly configured and the permission system would allow the edits. However, the model sees "STRICTLY FORBIDDEN... ZERO exceptions" and hesitates or refuses to write files, even to allowed directories.
Current Workaround
We've added an explicit override in our custom prompt:
You may later receive a system reminder stating you are in "READ-ONLY phase"
with edits "STRICTLY FORBIDDEN" and "ZERO exceptions".
**This rule applies EXCEPT for the `.mycompany/` directory and markdown files.**This works but is fragile - it relies on the model understanding that our exception overrides the "ZERO exceptions" statement.
Proposed Solution
One of the following:
-
Config option to disable the reminder: Add a flag like
planReminder: falseto disable injection ofplan.txt{ "agent": { "plan": { "planReminder": false } } } -
Config option to customize the reminder: Allow overriding the reminder text
{ "agent": { "plan": { "planReminder": "{file:.opencode/prompts/plan-reminder.md}" } } } -
Skip reminder when custom prompt is provided: If
agent.plan.promptis set, assume the user wants full control and don't inject the default reminder -
Make the reminder respect permissions: Dynamically generate the reminder based on actual configured permissions (e.g., "Read-only EXCEPT for .mycompany/* which is allowed")
Additional Context
- The reminder is injected in
src/session/prompt.tsat line 1206-1214 - The
insertReminders()function hardcodesif (input.agent.name === "plan") - Permissions are correctly merged with user config last, so the permission system itself works correctly
- The issue is purely the prompt text conflicting with configured permissions
Activity
github-actions commentedon Feb 24, 2026
This issue doesn't fully meet our contributing guidelines.
What needs to be fixed:
[FEATURE]:(e.g.[FEATURE]: Allow disabling or customizing Plan mode's hardcoded READ-ONLY system reminder)Please edit this issue to address the above within 2 hours, or it will be automatically closed.
This issue might be a duplicate of existing issues. Please check:
.md) in Plan mode — very similar ask.opencode/plans/#11078: Plan mode unwilling to write to.opencode/plans/— same underlying conflict between the hardcoded READ-ONLY reminder and configured permissionsIf you believe this was flagged incorrectly, please let a maintainer know.
[-]Feature Request: Allow disabling or customizing Plan mode's hardcoded READ-ONLY system reminder[/-][+][FEATURE]: Allow disabling or customizing Plan mode's hardcoded READ-ONLY system reminder[/+]github-actions commentedon Feb 24, 2026
Thanks for updating the issue! The title now correctly starts with
[FEATURE]:and the issue is well-structured with a clear problem statement, use case, and proposed solutions. Everything looks good — theneeds:compliancelabel has been removed.github-actions commentedon Apr 26, 2026
To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.
ChadNedzlek commentedon Oct 12, 2026
This is abosolutely infuriating. Plan mode is near useless with this, because it just SAYING the plan to me is no good. It need to get written down somewhere so that it doesn't immediately lose all the work I did making the plan. AND it's not even true! Writes ARE permitted to .opencode/plans, so the text shouldn't lie.