Skip to content

fix(opencode): move active plan backing file outside workspace#743

Merged
backnotprop merged 1 commit into
backnotprop:mainfrom
rcdailey:fix/active-plan-location
May 19, 2026
Merged

fix(opencode): move active plan backing file outside workspace#743
backnotprop merged 1 commit into
backnotprop:mainfrom
rcdailey:fix/active-plan-location

Conversation

@rcdailey
Copy link
Copy Markdown
Contributor

The edit-based submit_plan backing file (_active-plan.md) was stored at .opencode/plans/ inside the workspace, which shows up in git status. OpenCode's auto-generated .opencode/.gitignore doesn't cover plans/, so users would need to add it manually.

Moves the file to ~/.plannotator/active/{project}/ alongside the existing version history at ~/.plannotator/history/{project}/. Also cleans up the file on plan approval since it's no longer needed after the session ends (on denial it persists for the next edit cycle).

Follows up on #730.

The backing file used for edit-based plan submission was stored at
.opencode/plans/_active-plan.md inside the workspace, causing it to
appear in git status and editor file trees. It is now stored at
~/.plannotator/active/{project}/_active-plan.md alongside the version
history.

- Move getPlanBackingPath to derive path from project name under
  ~/.plannotator/active/
- Derive project name from ctx.directory basename via sanitizeTag at
  call site
- Delete backing file on approval since it is no longer needed after the
  session ends
- Update tests to reflect new path contract
@backnotprop backnotprop merged commit 29390c9 into backnotprop:main May 19, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants