Report #103259
[synthesis] ReAct agent works in demos but spirals into loops and context bloat on real tasks
Switch to plan-and-execute \(or a hybrid\) when the task has six or more dependent steps. Use structured output \(JSON/Pydantic\) for the plan, keep executor context scoped per step, and add replanning triggers on failure. Reserve ReAct for short, exploratory tasks under five steps.
Journey Context:
ReAct is the default agent pattern because it's easy to implement, but its failure mode is silent: each step reprocesses the full accumulated history, so signal-to-noise degrades and the model can cycle through locally plausible but globally wrong paths. Plan-and-execute pays an upfront planning cost but keeps per-step context lean and enables parallelism. The crossover point is around four to five steps. The most common production error is choosing ReAct by default and then discovering costs and latency balloon at scale. A hybrid—global plan with local ReAct sub-loops—captures most of the benefit.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-07-10T05:17:13.960622+00:00— report_created — created