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
unable to write plan to .opencode/plans in plan mode #10883
Plan
A restricted mode designed for planning and analysis. In plan mode, the following tools are disabled by default:
write - Cannot create new files
edit - Cannot modify existing files, except for files located at .opencode/plans/*.md to detail the plan itself
patch - Cannot apply patches
bash - Cannot execute shell commands
This mode is useful when you want the AI to analyze code, suggest changes, or create plans without making any actual modifications to your codebase.
However, all the models I tried actively resist modifying files even if I paste in the above excerpt.
Plugins
n/a
OpenCode version
1.1.36
Steps to reproduce
run opencode in terminal
choose local lm studio model (zai-org/glm-4.7-flash, google/gemma-3-27b, openai/gpt-oss-20b)
I think there's a misunderstanding regarding plan mode. According to the docs, the plan mode cannot create any new files, and there's no built-in function to automatically create a plan.md file somewhere.
You could use a plugin like plannotator to save the plan.md files.
Currently basic plan agent isn't designed to write files. You can enable this behaviour with OPENCODE_EXPERIMENTAL_PLAN_MODE=1 opencode and get a guided plan, write, handover experience that you might be expecting
You could use a plugin like plannotator to save the plan.md files.
I looked at this, this is massive overkill. I just want the agent to save the plan to a durable location so it's not lost as context fills up. That's the whole point of a "plan". If the plan isn't actually saved anywhere - what's the point of building a plan in plan mode if it's not being saved somewhere? As context grows the agent starts to become more and more fuzzy on those plan details stored in context, and eventually when compaction happens, those details are often lost. It's pretty important to save those details to a durable form of storage that the agent can always refer back to.
And clearly there was some intention of being able to write plans, otherwise why is .opencode/plans exempted from the no-write policy in plan mode?
OPENCODE_EXPERIMENTAL_PLAN_MODE=1 opencode
Sounds like what we want... How "experimental" is this exactly? Is it safe to use?
Reacted by Mez Pahlan, Ryan Beall, Mohamed Gharib, Daniel Nieto, Darel Bitsy, Zach Ritter, c01o, David Velasco, Chris Hart, Jeremy Harris and 4 more
Activity
github-actions commentedon Jan 27, 2026
This issue might be a duplicate of existing issues. Please check:
Feel free to ignore if none of these address your specific case.
cravenceiling commentedon Jan 27, 2026
I think there's a misunderstanding regarding plan mode. According to the docs, the plan mode cannot create any new files, and there's no built-in function to automatically create a
plan.mdfile somewhere.You could use a plugin like
plannotatorto save theplan.mdfiles.devdoshi commentedon Jan 29, 2026
@cravenceiling
ok so are you saying the docs should be updated to not say:
stevoland commentedon Jan 29, 2026
Currently basic plan agent isn't designed to write files. You can enable this behaviour with
OPENCODE_EXPERIMENTAL_PLAN_MODE=1 opencodeand get a guided plan, write, handover experience that you might be expectingjeremyakers commentedon Jan 31, 2026
I looked at this, this is massive overkill. I just want the agent to save the plan to a durable location so it's not lost as context fills up. That's the whole point of a "plan". If the plan isn't actually saved anywhere - what's the point of building a plan in plan mode if it's not being saved somewhere? As context grows the agent starts to become more and more fuzzy on those plan details stored in context, and eventually when compaction happens, those details are often lost. It's pretty important to save those details to a durable form of storage that the agent can always refer back to.
And clearly there was some intention of being able to write plans, otherwise why is .opencode/plans exempted from the no-write policy in plan mode?
Sounds like what we want... How "experimental" is this exactly? Is it safe to use?
fix(plan): remove path.relative from plan permission pattern
github-actions commentedon Apr 2, 2026
To stay organized issues are automatically closed after 90 days of no activity. If the issue is still relevant please open a new one.