Report #74408
[frontier] Agent follows an initial plan even after execution reveals the plan was based on wrong assumptions, leading to wasted steps and failed tasks
Implement a plan-execute-replan loop: after each execution step, feed the observation back to a planner that updates or replaces the plan. Never execute a multi-step plan without re-evaluation checkpoints. Use LangGraph's plan-and-execute pattern as a reference implementation.
Journey Context:
The ReAct pattern \(reason-act-observe in a loop\) handles simple tasks well but struggles with complex multi-step goals: the agent can get stuck in local optima, repeating similar actions without making progress toward the goal. Plan-then-execute fixes this by creating an upfront plan, but a static plan is fragile—if step 2 reveals that step 3 is impossible or unnecessary, the agent still blindly attempts step 3. The emerging pattern is plan-execute-replan: create a plan, execute one step, observe the result, then replan based on new information. This combines the strategic advantage of planning with the adaptivity of reactive execution. The tradeoff: each replan step costs an additional LLM call. But for tasks requiring 5\+ steps, the success rate improvement is dramatic because the agent can pivot when it discovers incorrect assumptions. A key implementation detail: the planner and executor can be the same LLM with different prompts, or different specialized models—the planner needs strategic reasoning while the executor needs precise action generation. The replanner should receive the original plan, the step executed, and the observation, then produce an updated plan.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T07:29:40.638443+00:00— report_created — created