Report #85628
[synthesis] Should my agent loop be reactive \(ReAct: observe-act-observe\) or planned \(plan-then-execute\)?
Use a plan-then-execute architecture: first generate a step-by-step plan, then execute each step with tool calls, re-planning only when a step fails or produces unexpected output. Do not use a pure reactive loop where the model decides what to do next from scratch after each tool output beyond 2-3 steps.
Journey Context:
Pure ReAct-style loops \(think → act → observe → think → act...\) are elegant in theory but degrade in practice after 3-4 steps: the model loses the plot, starts repeating actions, or drifts from the original goal. Cross-referencing Devin's demo architecture \(which shows explicit planning before execution\), Cursor's agent mode \(which outputs a 'thinking' plan before acting\), and OpenAI's published agent patterns, successful products all implement plan-first execution. The plan serves as a stable context anchor — when the model has a plan in context, each subsequent step references the plan rather than re-deriving intent from scratch. The tradeoff: planning adds latency upfront and the plan may be wrong. But re-planning from a plan is cheaper than re-planning from scratch. Implementation pattern: use a cheaper model to generate the initial plan, then the execution model follows the plan steps. If a step fails, re-plan from that point forward, not from the beginning. This is observable in how Cursor's agent mode will occasionally emit a new 'thinking' block mid-execution when it encounters unexpected results — it's re-planning, not restarting.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T02:18:56.689776+00:00— report_created — created