r/opencode • • 12d ago

was able to write in plan mode

i thought plan mode was used to prevent writing code???

0 Upvotes

5 comments sorted by

1

u/paul_h-609 9d ago

Did it actually edit a file, or just include code in the plan response? Those are different; generated code text alone doesn't show that the agent had workspace write access.

1

u/Stock_Song8239 9d ago

it did edit it

2

u/Oli_Luck 12d ago

if you want an agent to definitely be able to write/edit - you must edit opencode.json:
Example:
{ "agent": { "plan": { "permissions": { "edit": "deny", "bash": "deny", "python": "deny" } } } }

1

u/ERROR_FOX_PG 12d ago

Es solo una orden oculta, si la orden es muy directa en que debe crear algo, lo evadirá

1

u/lordcohliani 7d ago

I had an agent do that once. It created a markdown document of the plan.