You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
submit_plan not appear after plan is finished #328
Issue is in theirs plan prompt. But for anthropics they use different prompt, which allow plan writing. Maybe tool that accepts plan as text would work. But essentially we need to patch prompt to make it work as intended.
I don't know if this is related but the submit_plan tool is still visible in context and I think that confuses the agent. The behavior is worse than before since it can't figure out where files go:
Yes, normally I've been able to use submit_plan in any primary agent (for me, that's primarily the Build and Plan agents). The two have worked uniformly regardless of the agent selected.
With your new approach of tighter integration in Plan mode, it's no longer clear to me what the intent is between the Plan primary agent and non-Plan agents: Do you intend Plan to be the only place that plannotator exists and can be invoked? If so, that's definitely not the behavior I observed as of my previous comment.
I will bring back the flexibility of memory vs file writing plans. And support both.
This morning I removed the restrictions around file writing, but I'll make sure I'll re-prompt engineer in a more flexible manner.
Submit plan will act the same way it used to and work with other agents. But there will be a new version for the file writing focus for users who want that.
0.14.0 should be less intrusive, but will launch above updates in 0.14.1 today
PR #333 addresses this by restoring the original text-based submit_plan(plan) that worked uniformly across all agents, and keeping the file-based workflow as a separate submit_plan_file(path) tool.
Key changes:
Two tools: submit_plan (pass markdown text) + submit_plan_file (pass file path) — agent chooses based on context
Unified prompt for all primary agents — no more split behavior between plan/non-plan agents
Removed fragile TodoWrite replacements — the 40+ .replace() calls and regex rewrites are gone
Still strips OpenCode's STRICTLY FORBIDDEN rules and suppresses plan_exit
I want to make sure I'm on the same page with you. I apologize for any confusion.
I fully support the file-based approach, what is unclear to me is how it is supposed to work. The agent not being clear on where the files should go seems like leaked implementation detail, not necessarily a flaw in your approach.
I am also concerned that you're introducing two different ways to use the tool when arguably one is sufficient. Sorry if my feedback led you down this path.
The file based approach is appealing to me because it (presumably) addresses one of the concerns I've had since I discovered Plannotator: The inability for the agent to iterate on the plan in the form of edits. Historically it had to recreate the entire document again every time I sent feedback. A file-based approach enables the agent to edit subsets of the present plan with each iteration of feedback which is a huge improvement.
Where the files go, the fact that the agent is even editing a file at all, could be abstracted. I don't know what level of abstraction is appropriate, nor how this is influenced by the OC native plan tooling. It's also unclear to me as I indicated previously if the submit_plan tool should be visible in context if you're taking an opencode-first approach. I don't mind being in Plan mode to use Plannotator (that's sort of the purpose).
You could argue that submit_plan being usable in the Build agent was unintended behavior; for me personally I don't feel like I'll lose anything by having to first swap to Plan mode to use plannotator going forward. I just want to make sure I understand what your intended use is going forward; I don't mean to necessarily ask for multiple ways to use it.
edit - Cannot modify existing files, except for files located at .opencode/plans/*.md to detail the plan itself
I'll be honest, I don't think I ever used plan mode in opencode without plannotator. So I don't really know how it's supposed to work.
However based on the docs above, plan files should be written to a specific location. But when I tested a faux plan (in Plan Mode) using Plannotator v0.14.0, it did the following:
Wrote a file to the root of my repo (which I thought should have been prohibited)
Invoked submit_plan with the path to that file
I suppose I assumed OC had its own built in "plan" tool that abstracted the fact that it was writing to markdown files from the user, but maybe I'm remembering the way Claude Code does it instead. Either way, writing the markdown file to the root of my repo in Plan mode feels wrong. But that might be an OC issue; plannotator seems to render the markdown file correctly.
submit_plan(plan) accepts either markdown text or a file path. The agent has flexibility to pass plan text directly from context, or write a plan file and pass the path — whichever fits the workflow. One tool, works from any primary agent.
Text flow: No files written, no directory conflicts. Matches the pre-v0.13 behavior.
File flow: Agent writes a plan file, passes the path. On rejection, feedback points back at that same file so the agent can edit and resubmit without rewriting from scratch.
What we fixed
Relaxed the tight OpenCode plan mode integration that was causing directory and permission conflicts
submit_plan works uniformly across all primary agents again, not just Plan
How this maps to reported issues
@ilmpc: Agent refusing to write/edit in plan mode → text flow sidesteps the file permission conflict entirely. Prompt stripping still handles the plan agent case.
@rcdailey: submit_plan works uniformly across agents again. Single tool, not two. File-based iteration works — agent edits the same file on rejection. No leaked implementation details about where files should go.
Finally,I solved the problem by switching to a different model。I switched model from GPT-5-mini to opus 4.6, and submit_plan is called successfully !
Another solution is to explicitly instruct the model to use submit_plan to submit the plan,for example:
generated the plan and use plannotator let me to review it
I'm not sure if this is repeatable behavior, but with latest (14.1) plannatator, model got rogue and started to write python to edit code (to bypass edit restrictions).
I was working in old session (before plannatator upgrade) with 80k context with gpt 5.4. I've switched to plan and asked for refactor. It's ignored plan mode and started edit with scripts.
UPD: well, it's repeatable with new session. looks like if model is not STRICTLY FORBIDDEN to write it starting to do whatever it wants.
Fixed in v0.14.2 via #341. The plan mode prompt is now replaced instead of stripped, so agents keep their guardrails while gaining the .md file writing exception.
@backnotprop I'm sorry to report that in 0.14.2, in plan mode, the agent is using the string version of the submit plan tool instead of file-based plans like before. This is a step backwards, IMO.
Activity
backnotprop commentedon Mar 18, 2026
Deubg..
/slash commands?4.1
4.21
What version and OS?
ilmpc commentedon Mar 18, 2026
Hey! I faced same issue, it feels like opencode changed plan mode prompt. And now LLM refuses to use edit even if it's explicitly allowed for plans.
backnotprop commentedon Mar 18, 2026
Yeah, I see it gets confused with the paths that OpenCode allows for plan mode. I'll add some flexibility into it.
ah, opencodes config set for allowed paths is buggy
ilmpc commentedon Mar 18, 2026
Issue is in theirs plan prompt. But for anthropics they use different prompt, which allow plan writing. Maybe tool that accepts plan as text would work. But essentially we need to patch prompt to make it work as intended.
anomalyco/opencode#11078
backnotprop commentedon Mar 18, 2026
Yeah, I'm in the middle of this right now. Should have a patch soon.
rcdailey commentedon Mar 18, 2026
I don't know if this is related but the
submit_plantool is still visible in context and I think that confuses the agent. The behavior is worse than before since it can't figure out where files go:backnotprop commentedon Mar 18, 2026
@rcdailey are you saying it's being called when you're outside of plan mode?
I'm sending a patch in now that will fix the submit writing issues.
backnotprop commentedon Mar 18, 2026
This is a tricky process right now. I'm not sure if the current patchwork is going to hold.
backnotprop commentedon Mar 18, 2026
Pushed patch updates to 0.14.0
rcdailey commentedon Mar 18, 2026
Yes, normally I've been able to use submit_plan in any primary agent (for me, that's primarily the Build and Plan agents). The two have worked uniformly regardless of the agent selected.
With your new approach of tighter integration in Plan mode, it's no longer clear to me what the intent is between the Plan primary agent and non-Plan agents: Do you intend Plan to be the only place that plannotator exists and can be invoked? If so, that's definitely not the behavior I observed as of my previous comment.
I hope that makes sense.
backnotprop commentedon Mar 18, 2026
I will bring back the flexibility of memory vs file writing plans. And support both.
This morning I removed the restrictions around file writing, but I'll make sure I'll re-prompt engineer in a more flexible manner.
Submit plan will act the same way it used to and work with other agents. But there will be a new version for the file writing focus for users who want that.
0.14.0 should be less intrusive, but will launch above updates in 0.14.1 today
fix: restore uniform submit_plan and add submit_plan_file for OpenCode
backnotprop commentedon Mar 18, 2026
PR #333 addresses this by restoring the original text-based
submit_plan(plan)that worked uniformly across all agents, and keeping the file-based workflow as a separatesubmit_plan_file(path)tool.Key changes:
submit_plan(pass markdown text) +submit_plan_file(pass file path) — agent chooses based on context.replace()calls and regex rewrites are goneSTRICTLY FORBIDDENrules and suppressesplan_exit#333
rcdailey commentedon Mar 18, 2026
I want to make sure I'm on the same page with you. I apologize for any confusion.
I fully support the file-based approach, what is unclear to me is how it is supposed to work. The agent not being clear on where the files should go seems like leaked implementation detail, not necessarily a flaw in your approach.
I am also concerned that you're introducing two different ways to use the tool when arguably one is sufficient. Sorry if my feedback led you down this path.
The file based approach is appealing to me because it (presumably) addresses one of the concerns I've had since I discovered Plannotator: The inability for the agent to iterate on the plan in the form of edits. Historically it had to recreate the entire document again every time I sent feedback. A file-based approach enables the agent to edit subsets of the present plan with each iteration of feedback which is a huge improvement.
Where the files go, the fact that the agent is even editing a file at all, could be abstracted. I don't know what level of abstraction is appropriate, nor how this is influenced by the OC native plan tooling. It's also unclear to me as I indicated previously if the submit_plan tool should be visible in context if you're taking an opencode-first approach. I don't mind being in Plan mode to use Plannotator (that's sort of the purpose).
You could argue that submit_plan being usable in the Build agent was unintended behavior; for me personally I don't feel like I'll lose anything by having to first swap to Plan mode to use plannotator going forward. I just want to make sure I understand what your intended use is going forward; I don't mean to necessarily ask for multiple ways to use it.
Thanks for the quick turnaround on discussion.
rcdailey commentedon Mar 18, 2026
Quick follow up. I'm even more confused now. First, I checked the opencode docs: https://opencode.ai/docs/modes/#plan
I'll be honest, I don't think I ever used plan mode in opencode without plannotator. So I don't really know how it's supposed to work.
However based on the docs above, plan files should be written to a specific location. But when I tested a faux plan (in Plan Mode) using Plannotator v0.14.0, it did the following:
I suppose I assumed OC had its own built in "plan" tool that abstracted the fact that it was writing to markdown files from the user, but maybe I'm remembering the way Claude Code does it instead. Either way, writing the markdown file to the root of my repo in Plan mode feels wrong. But that might be an OC issue; plannotator seems to render the markdown file correctly.
fix: single submit_plan with auto-detect text/path for OpenCode
backnotprop commentedon Mar 18, 2026
PR #333 has been updated. Here's what's changing:
Single
submit_plantool, text or file pathsubmit_plan(plan)accepts either markdown text or a file path. The agent has flexibility to pass plan text directly from context, or write a plan file and pass the path — whichever fits the workflow. One tool, works from any primary agent.What we fixed
submit_planworks uniformly across all primary agents again, not just PlanHow this maps to reported issues
submit_planworks uniformly across agents again. Single tool, not two. File-based iteration works — agent edits the same file on rejection. No leaked implementation details about where files should go.Will tag a release once I've finished testing.
fix: single submit_plan with text/path auto-detect for OpenCode (#333)
linxi-1214 commentedon Mar 19, 2026
Finally,I solved the problem by switching to a different model。I switched model from
GPT-5-minitoopus 4.6, andsubmit_planis called successfully !Another solution is to explicitly instruct the model to use
submit_planto submit the plan,for example:ilmpc commentedon Mar 19, 2026
I'm not sure if this is repeatable behavior, but with latest (14.1) plannatator, model got rogue and started to write python to edit code (to bypass edit restrictions).
I was working in old session (before plannatator upgrade) with 80k context with gpt 5.4. I've switched to plan and asked for refactor. It's ignored plan mode and started edit with scripts.
UPD: well, it's repeatable with new session. looks like if model is not STRICTLY FORBIDDEN to write it starting to do whatever it wants.
@backnotprop
backnotprop commentedon Mar 19, 2026
I'm patching that prompt @ilmpc
It's wild to me how sensitive this harness is to different prompts.
fix: replace plan mode prompt instead of stripping it
fix: replace plan mode prompt instead of stripping it (#341)
backnotprop commentedon Mar 19, 2026
Fixed in v0.14.2 via #341. The plan mode prompt is now replaced instead of stripped, so agents keep their guardrails while gaining the .md file writing exception.
rcdailey commentedon Mar 19, 2026
@backnotprop I'm sorry to report that in 0.14.2, in plan mode, the agent is using the string version of the submit plan tool instead of file-based plans like before. This is a step backwards, IMO.