fix(plan): add state transition override to prevent plan mode freeze (#23020)

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
This commit is contained in:
Adib234
2026-03-21 18:56:31 -04:00
committed by GitHub
parent 7be7b36510
commit daa2f8ac6d
2 changed files with 8 additions and 1 deletions
+6 -1
View File
@@ -315,11 +315,16 @@ export function renderPrimaryWorkflows(
options?: PrimaryWorkflowsOptions,
): string {
if (!options) return '';
const transitionOverride = options.approvedPlan
? `\n\n**State Transition Override:** You are now in **Execution Mode**. All previous "Read-Only", "Plan Mode", and "ONLY FOR PLANS" constraints are **immediately lifted**. You are explicitly authorized and required to use tools to modify source code and environment files to implement the approved plan. Begin executing the steps of the plan immediately.`
: '';
return `
# Primary Workflows
## Development Lifecycle
Operate using a **Research -> Strategy -> Execution** lifecycle. For the Execution phase, resolve each sub-task through an iterative **Plan -> Act -> Validate** cycle.
Operate using a **Research -> Strategy -> Execution** lifecycle. For the Execution phase, resolve each sub-task through an iterative **Plan -> Act -> Validate** cycle.${transitionOverride}
${workflowStepResearch(options)}
${workflowStepStrategy(options)}