Skip to content

submit_plan: replace dual-mode auto-detect with a single deterministic path #365

Closed

Description

@rcdailey

I've been following (and commenting on) the plan mode changes since v0.13.1. My feedback in #328 covers the full arc, but the core problem hasn't been addressed so I think it's worth a dedicated issue.

Problem

submit_plan accepts both inline markdown and file paths, with auto-detection choosing the mode based on what the agent passes. This means the plugin's behavior depends on prompt engineering successfully steering the agent toward the right mode.

In practice, this has been fragile:

  • v0.13.1 introduced file-based plans
  • v0.14.0 hit permission conflicts with file writing
  • v0.14.1 collapsed two tools into one with auto-detect
  • v0.14.2 replaced the plan mode prompt and the agent reverted to inline markdown (my last comment on submit_plan not appear after plan is finished #328, which went unanswered)
  • v0.14.3 and v0.14.4 shipped without addressing this

Four releases in five days, most dealing with prompt/permission interactions around the dual-mode design. The agent choosing "wrong" shouldn't be a failure mode.

Why it matters

The whole point of file-based plans is token efficiency. Repeating the entire plan as inline markdown on every feedback cycle is wasteful. But the current architecture only delivers that benefit when the agent happens to choose file mode, which is prompt-dependent and (as of v0.14.2) not working.

I also think offering both modes makes the tool harder for agents to use correctly. A single clear path removes the prompt engineering burden entirely.

Ideas

I don't know what constraints you're working with, so here are a few approaches to consider rather than a single prescription.

Option A: Plugin manages the file internally. The agent always passes inline markdown. The plugin writes it to a .md file behind the scenes (.opencode/plans/ follows OC's documented convention). On denial, the feedback tells the agent "your plan is at /path/to/plan.md, edit it and resubmit." If the agent follows that hint, it uses edit for targeted changes (token-efficient). If it ignores the hint and passes full markdown again, the plugin just overwrites the file. The file becomes an optimization the plugin enables but doesn't strictly require.

Option B: Tool only accepts a file path. The agent must write a .md file and pass the path. No inline markdown accepted. This is the simplest contract but depends on the agent reliably writing files first, which might have its own prompt challenges in plan mode given OC's edit restrictions.

These are just starting points. Maybe there's a cleaner approach I'm not seeing. The important thing (from my perspective) is that there's one deterministic path, not two modes the agent has to choose between.

Activity

  1. backnotprop commented on Mar 22, 2026

    @backnotprop
    Owner

    I had others who requested the memory based plans to come back. I was trying to be flexible. I think we can arrive at a good UX for them, though.

    There are numerous things that made this hard during testing, but I will continue iterating.

  2. backnotprop commented on May 15, 2026

    @backnotprop
    Owner

    #730 addressed this

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions