Skip to content

[FEATURE]: Allow disabling or customizing Plan mode's hardcoded READ-ONLY system reminder #14882

Closed as not planned

Description

@nabilfreeman

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:

  1. Config option to disable the reminder: Add a flag like planReminder: false to disable injection of plan.txt

    {
      "agent": {
        "plan": {
          "planReminder": false
        }
      }
    }
  2. Config option to customize the reminder: Allow overriding the reminder text

    {
      "agent": {
        "plan": {
          "planReminder": "{file:.opencode/prompts/plan-reminder.md}"
        }
      }
    }
  3. Skip reminder when custom prompt is provided: If agent.plan.prompt is set, assume the user wants full control and don't inject the default reminder

  4. 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.ts at line 1206-1214
  • The insertReminders() function hardcodes if (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

  1. added
    coreAnything pertaining to core functionality of the application (opencode server stuff)
    on Feb 24, 2026
  2. github-actions commented on Feb 24, 2026

    @github-actions
    Contributor

    This issue doesn't fully meet our contributing guidelines.

    What needs to be fixed:

    • Feature request titles should start with [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:

    If you believe this was flagged incorrectly, please let a maintainer know.

  3. changed the title [-]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[/+] on Feb 24, 2026
  4. github-actions commented on Feb 24, 2026

    @github-actions
    Contributor

    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 — the needs:compliance label has been removed.

  5. github-actions commented on Apr 26, 2026

    @github-actions
    Contributor

    To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.

  6. ChadNedzlek commented on Oct 12, 2026

    @ChadNedzlek

    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.

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

Metadata

Metadata

Assignees

Labels

coreAnything pertaining to core functionality of the application (opencode server stuff)

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions