plan: built-in save reminder conflicts with custom Plan agent prompts in V2

Offen
#67,063 1 Kommentar 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Anfängerfreundlichkeit
52/100
Issue-Typ
Feature
Klarheit
Klar beschrieben
Aktivitätsstatus
Aktiv
Tech-Stack
typescript
Bereich
ai, tooling

Rechercherichtung

Start at packages/core/src/plugin/plan.ts, where the V2 Plan plugin injects the save reminder separately from the agent's system prompt, and compare with the additive instructions field introduced by #63669. Then look at how a custom plan agent definition (e.g. .opencode/agents/plan.md) is loaded and merged with the built-in plan agent config. Done means a custom plan definition can replace the whole built-in reminder while the default reminder still applies when there is no override, and existing tool write permissions are unchanged.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

area/plugins platform/linux type/feature version/v2
Description

My custom plan agent is configured to save each completed plan automatically to docs/superpowers/plans/. In OpenCode v2.4.2, the built-in Plan instructions still tell the model to save only when explicitly asked and only under ~/.opencode/plan. In my session, the assistant returned the plan in chat and saved it to the global directory only after I asked again.

The V2 Plan plugin supplies this reminder separately from the agent’s system prompt. #63669 moved it into an additive instructions field that is plugin-only.

Proposed Solution: Let a custom plan definition replace the entire built-in reminder, while preserving the current default for users without an override. Existing tool permissions should still govern where the agent can write.

Why #55683 alone isn’t enough: A configurable directory would resolve where the plan goes. The reminder would still say “Do not create or update plan files unless the user explicitly asks you to,” so it would still conflict with automatic saving even if both prompts named the same directory.

Related: #14882 reports the underlying reminder conflict in V1; #55683 tracks the hardcoded directory in V2.

Plugins

Superpowers v7.0.2; OpenCode Traffic Light terminal plugin.

OpenCode version

2.4.2

Steps to reproduce
  1. Override the built-in plan agent with .opencode/agents/plan.md. To isolate the reminder conflict from the directory restriction, use the default allowed directory:

    ---
    mode: primary
    ---
    When an implementation plan is complete, save it automatically to
    ~/.opencode/plan/example.md without waiting for a separate request.
    
  2. Select Plan and ask it to draft a small implementation plan without asking it to save.

  3. Inspect the model context: the custom prompt calls for automatic saving, while the built-in Plan instructions require a separate request.

Operating System

Linux x86_64 (CachyOS, kernel 7.3.6).

Terminal

WezTerm.

Vorherrschende Sprache
TypeScript
Sterne
230k
Forks
31.3k
Ø Merge
5 Std. 32 Min.
Gemergte PRs (30 T.)
453

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus anomalyco/opencode

Alle Issues in anomalyco/opencode

Ähnliche Issues

Weitere Issues zu TypeScript

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.