Report #24659
[frontier] ReAct agent loses track of overall goal and repeats steps on complex multi-step tasks
Switch to Plan-and-Execute: separate the agent into a Planner \(generates a full step-by-step plan\) and an Executor \(executes one step at a time\). After each execution step, feed the result back to the Planner for replanning before the next step. Use ReAct only for tasks with fewer than approximately 5 steps.
Journey Context:
ReAct \(Reason-Act-Observe loop\) is the default agent pattern but has a fundamental limitation: it optimizes locally. Each turn the agent reasons about what to do next based on the immediate context, without a global plan. For simple tasks this is fine, but for complex tasks \(8\+ steps with dependencies\) the agent drifts — it forgets the original goal, repeats steps already completed, or takes suboptimal paths that seemed reasonable locally. Plan-and-Execute fixes this by generating a full plan upfront, then executing step-by-step with replanning after each step. The replanning step is critical — without it, the plan becomes stale when steps produce unexpected results \(a tool returns an error, or reveals that step 3 is unnecessary\). The tradeoff: Plan-and-Execute has higher overhead for simple tasks \(the planning call is wasted if the answer is straightforward\). Rule of thumb from production systems: use ReAct for fewer than 5 steps, Plan-and-Execute for 5 or more. A hybrid approach works well: plan at a high level \(3-5 major phases\), then use ReAct within each phase for the detailed step-by-step work. This combines global coherence with local flexibility.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T19:47:45.175810+00:00— report_created — created