anomalyco / anomalyco/opencode

[FEATURE]: V2 Plan mode: restore V1 experimental plan mode's persistent session plan file workflow

Open
#49,879 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
209k
Forks
27.5k
PR merge metrics
PR metrics pending

Description

Feature hasn't been suggested before.
  • I have verified this feature I'm about to request hasn't been suggested before.
Describe the enhancement you want to request

The experimental plan mode in OpenCode v1 had a clear workflow for planning:

enter Plan
    ↓
derive .opencode/plans/<session-timestamp>-<slug>.md
    ↓
inject exact path into Plan reminder
    ↓
allow Plan to create/update only that file
    ↓
plan_exit references the same canonical path
    ↓
approved Build session is told to execute that plan

The current plan agent in v2 is lacking some of these steps. It allows creation of plan files, but the plan agent has no system prompt, which means the model is never instructed to create and maintain a plan file for the session, nor does OpenCode generate a timestamp-prefixed plan filename for the agent to use. Furthermore, the plan mode reminder added in https://github.com/anomalyco/opencode/pull/41665 says strictly "You are not allowed to edit or create files" which again discourages the plan agent from creating and maintaining a plan file in the allowed location.

I recommend:

  • Create a Plan agent prompt that instructs the agent to create and maintain a specific plan file, with a filename generated for each session matching the format <session-timestamp>-<slug>.md
  • Update the plan mode reminder to "You are not allowed to edit or create files other than the plan file for this session."

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the current v2 plan agent, plan mode reminder, plan_exit, and approved Build-session handoff, then compare them with the described V1 workflow. Done means each session has a timestamp-prefixed slugged plan path, the agent is instructed to maintain only that file, plan_exit uses the same path, and Build is told to execute it.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
ai, cli, developer-experience
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.