Repository navigation
fix: OpenCode plan mode permissions and prompt conflicts - #329
Merged
Merged
Conversation
- Add per-agent edit permission (*.md allow) for the plan agent via opencodeConfig.agent.plan.permission.edit, fixing the path.relative worktree mismatch that caused PermissionDeniedError on plan writes - Strip OpenCode's "STRICTLY FORBIDDEN" plan mode prompt from synthetic user message parts via experimental.chat.messages.transform - Replace conflicting TodoWrite/planning instructions in the base prompt when plan agent is active (surgical replacements + global sweep) - Override todowrite tool description to redirect to submit_plan - Enhance submit_plan tool description with planning workflow guidance - Add system-reminder reinforcing plan mode behavior on every turn - Disable validatePlanPath directory restriction (plans can be written anywhere) - Strengthen planning prompt with explicit anti-TodoWrite language, required workflow summary, and mkdir instruction Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Owner
Author
Code reviewFound 1 issue:
|
2 of 5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
PermissionDeniedErrorwhen the plan agent tries to write.mdfiles — adds per-agent edit permission (*.md: allow) scoped to the plan agent only viaopencodeConfig.agent.plan.permission.edittodowritetool description to redirect tosubmit_plansubmit_plantool description with planning workflow guidance<system-reminder>reinforcing plan mode behavior on every turnvalidatePlanPathdirectory restriction so plans can be written anywhereRelated issues
Fixes #328
Also addresses upstream OpenCode issues:
.opencode/plans/anomalyco/opencode#11078Test plan
./tests/manual/local/sandbox-opencode.shand enter plan modesubmit_plan