[PR #6315] feat: implement exitplanmode tool for plan mode workflow #11833

Open
opened 2026-02-16 18:16:46 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/anomalyco/opencode/pull/6315

State: open
Merged: No


Previously, plan mode prompts referenced an ExitPlanMode tool that didn't exist, causing the AI to get stuck in loops when trying to exit planning.

Changes:

  • Add exitplanmode tool that accepts a plan parameter and signals transition out of planning phase
  • Register tool in registry, filtered to only be available in plan mode
  • Simplify plan mode prompts to clearly explain the workflow
  • Add guidance for interpreting future-tense user instructions (e.g., "remember to add tests") as plan items, not immediate actions

This fixes the issue where users saying things like "make sure you write a markdown before starting" would cause the AI to loop indefinitely, unable to reconcile the instruction with plan mode constraints.

**Original Pull Request:** https://github.com/anomalyco/opencode/pull/6315 **State:** open **Merged:** No --- Previously, plan mode prompts referenced an ExitPlanMode tool that didn't exist, causing the AI to get stuck in loops when trying to exit planning. Changes: - Add exitplanmode tool that accepts a plan parameter and signals transition out of planning phase - Register tool in registry, filtered to only be available in plan mode - Simplify plan mode prompts to clearly explain the workflow - Add guidance for interpreting future-tense user instructions (e.g., "remember to add tests") as plan items, not immediate actions This fixes the issue where users saying things like "make sure you write a markdown before starting" would cause the AI to loop indefinitely, unable to reconcile the instruction with plan mode constraints.
yindo added the pull-request label 2026-02-16 18:16:46 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#11833