Skip to content

fix(opencode): preserve planning handoff#1034

Open
franktronics wants to merge 1 commit into
backnotprop:mainfrom
franktronics:fix/opencode-plan-approval-handoff
Open

fix(opencode): preserve planning handoff#1034
franktronics wants to merge 1 commit into
backnotprop:mainfrom
franktronics:fix/opencode-plan-approval-handoff

Conversation

@franktronics

Copy link
Copy Markdown

Summary

  • Prevent the OpenCode plan agent and configured planning agents from receiving the Proceed with implementation handoff after plan approval.

  • Keep the implementation handoff unchanged for build and other non-planning agents.

  • Emit a visible status message when approval targets a planning agent:

    Plan approved. Plan mode remains active; no implementation has been requested.

Related issues

Regression from #648: the agent picker correctly removed the implementation directive for No switch, but selecting plan still injected Proceed with implementation.

#648 also addressed #159, which requested approval without automatically starting implementation. This change preserves that behavior when the selected target is a planning agent.

Changes

File Change
apps/opencode-plugin/workflow.ts Adds a planning-target predicate for implementation handoffs.
apps/opencode-plugin/index.ts Sends the implementation prompt only to non-planning agents; planning agents receive a non-executing status message instead.
apps/opencode-plugin/workflow.test.ts Covers build, plan, custom planning agents, and regular non-planning agents.

Test plan

  • bun test apps/opencode-plugin
  • bun run build:opencode
  • Manual: selecting plan keeps plan mode active and displays the status message.
  • Manual: selecting build still sends Proceed with implementation.

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.

1 participant