Skip to main content
Agent promptsPrompt patternsClaudeChatgpt

ReAct vs Plan-and-Execute: Which Agent Prompt to Use

ReAct vs plan-and-execute agents: when to loop step-by-step and when to plan upfront. Two pasteable prompt skeletons and a decision rule tied to model behavior.

PPromptsCart Team·July 23, 2026·Updated July 23, 2026·8 min read

Two agents get the same task. One thinks for a second, runs a step, looks at the result, and decides what's next. The other writes the entire plan first, then marches through it. Same goal, very different behavior, very different cost. ReAct vs plan-and-execute agents is the first architecture choice you make when you write an agent prompt, and getting it wrong shows up as either runaway token bills or agents that can't recover from a surprise.

The trade-off is well explained in the abstract. What's missing is the part you paste: two prompt skeletons and a rule for choosing between them on a real job.

What each pattern actually does

ReAct (reason + act) is a tight loop. The agent generates a thought, takes one action, reads the observation, then generates the next thought informed by what just happened. There's no full plan. The agent navigates step by step and adapts when a tool returns something unexpected. One model call per step.

Plan-and-execute splits the work. A planner reads the goal and emits an ordered list of steps, calling no tools, only thinking. An executor then runs those steps in sequence, often as a small ReAct loop per step. The planner decides the route; the executor follows it.

The cost difference is structural

ReAct makes one model call per step, and a long chain gets expensive fast because every step replays the growing history. Plan-and-execute front-loads the thinking into one planning call, then runs cheaper, shorter executor calls. On a ten-step task, that's often the difference between one big bill and one small one. The trade is adaptability.

ReAct vs plan-and-execute at a glance

The honest comparison is a table, because the patterns win on different axes. This is the part LLM answer engines tend to quote, so it's worth getting precise.

DimensionReActPlan-and-execute
Model callsOne per step, grows with chain lengthOne plan call, then cheaper step calls
Adapts to surprisesYes, every step sees the last observationWeakly, unless it re-plans mid-run
Inspectable before runningNo, the path emerges liveYes, the plan is reviewable upfront
Cost on long tasksHigh, history replays each stepLower, planning is amortized
Best forMessy, uncertain, tool-heavy tasksPredictable, multi-step workflows
Failure modeWanders, loops, burns tokensFollows a wrong plan to the end

Neither is "better." A migration with a known sequence wants a plan you can read before it touches anything. A debugging session where each finding changes the next move wants ReAct. The skill is matching the pattern to how predictable the task is.

What you can do with the two skeletons

  • Run a step-by-step ReAct loop when the path depends on what tools return
  • Generate a reviewable plan before any action touches your system
  • Cap cost by planning once instead of reasoning on every step
  • Hand an ordered plan to a ReAct executor for the hybrid that most production agents use
  • Pin a per-step output contract so logs stay parseable either way
  • Switch patterns per job without rewriting the agent from scratch

Anatomy of the two prompts

The patterns are two different output contracts. Keep them separate.

ReAct skeleton
Variables → {{task_goal}}, {{available_tools}}, {{scratchpad}}
Output contract (per turn, locked):
  thought:     [ one line of reasoning ]
  action:      [ tool name + args, or FINISH ]
  observation: [ filled by the runtime, fed back ]

Plan-and-execute skeleton
Variables → {{task_goal}}, {{available_tools}}, {{constraints}}
Output contract (plan, locked):
  steps: [ ordered, each step independently verifiable ]
  each step: { intent, tool, success_check }

The ReAct contract repeats every turn; the planner contract fires once. Because both lock their shape, you can log and replay either one. A planner whose steps each carry a success_check is what lets the executor know when a step is actually done, instead of guessing.

Where models differ

The patterns honor structure differently across models. Claude holds a multi-turn ReAct contract well and rarely drops the thought line, which keeps traces readable. GPT-4o is strong at the planning call but tends to pad plans with extra steps unless you cap the count in {{constraints}}; it also wants the output shape restated on the final line. Gemini plans concisely but is more likely to start acting during a planning prompt, so the "call no tools" instruction has to be explicit and near the end. Pick your model and test the skeleton against it before you ship.

An opinionated take: most teams default to ReAct because it's the famous pattern, then act surprised when a long task costs a fortune and loops. If your workflow is even roughly predictable, plan first. A reviewable plan you can reject before execution is worth more than the adaptability you're rarely using. The free Agent Step Planner gives you the planning skeleton with a {{task_goal}} variable and an ordered-step contract, so you can try plan-first without writing it yourself.

Step-by-step: choosing and wiring the pattern

1. Rate the task's predictability

If you could write the steps before starting, lean plan-and-execute. If each step depends on the last result, lean ReAct.

2. Pick the skeleton

Copy the matching contract. Don't try to merge them. A prompt that does both does neither cleanly.

3. Set the budget guard

For ReAct, cap the loop count so a wandering agent can't run forever. For plan-and-execute, cap the step count in {{constraints}}.

4. Add a success check per step

Every step needs a way to know it's done. Without it, the executor either stops early or never stops.

5. Consider the hybrid

Plan at the top, run a short ReAct loop inside each step. This is what most resilient agents actually do, and it pairs a reviewable plan with local adaptability.

Variables you'll set

VariableRequiredWhat it is
{{task_goal}}YesThe outcome the agent is working toward
{{available_tools}}YesThe tools the agent may call, named
{{scratchpad}}ReAct onlyRunning thought-action-observation history
{{constraints}}Plan onlyStep cap, budget, and hard rules for the plan

The failure mode each pattern hides

ReAct's hidden failure is the loop: the agent retries the same failing action with slightly different wording until the budget runs out. A loop counter and a "if a step fails twice, stop and report" rule catch most of it. Plan-and-execute's hidden failure is the opposite: a confident but wrong plan that the executor follows all the way to a broken result, because nothing re-checks the plan against reality. Build a re-plan trigger for when a step's success_check fails. And remember a plan that worked on one model version can drift after an update, so pin the version for anything load-bearing.

Plan first, loop locally

The strongest default for non-trivial tasks isn't pure ReAct or pure plan-and-execute. Plan once, then let each step run a short adaptive loop. You get a plan you can inspect and reject, plus the ability to recover inside a step when a tool surprises you. Pure ReAct is for genuinely open-ended exploration.

For turning a single goal into the ordered steps a planner needs, see task decomposition prompt for coding agents, and for keeping the {{scratchpad}} from overflowing on a long ReAct run, see agent memory design patterns that hold up.

Getting started

  1. Decide how predictable your task is.
  2. Copy the matching skeleton and lock its output contract.
  3. Add the loop cap or step cap.
  4. Give every step a success_check.
  5. Test the contract against your target model.
  6. Move to the hybrid once the basics hold.
  7. Start from the free Agent Step Planner for the plan-first path.
Try the free Agent Step Planner
Skip the setup

The Agent Task Decomposition System Prompt handles the planner half end-to-end: a {{task_goal}} variable produces ordered, independently-verifiable steps with a per-step success check, the exact contract a plan-and-execute agent needs. It's part of The Complete AI Prompts Bundle, a one-time lifetime license to the whole catalog plus future packs, worth it if you run more than one of these agent jobs.

Get the Agent Task Decomposition System Prompt

Once your agent is choosing tools mid-loop, the next problem is which tools to expose — see tool selection prompt for AI agents, and browse the rest of the planning packs when you're ready to go deeper.

FAQ

Common questions

What is the difference between ReAct and plan-and-execute agents?
A ReAct agent thinks, takes one action, observes the result, then decides the next step, adapting as it goes. A plan-and-execute agent writes the whole plan first, then runs the steps in order. ReAct adapts to surprises; plan-and-execute is cheaper and inspectable before anything runs.
When should you use a plan-and-execute agent instead of ReAct?
Use plan-and-execute when the workflow is predictable and you want to review the plan before execution and cap cost. Use ReAct when intermediate results keep changing the situation and the path isn't clear upfront. Many production agents plan at the top level and use a short ReAct loop inside each step.
Can the same prompt do both ReAct and plan-and-execute?
No single prompt does both well. They have different output contracts: ReAct emits a thought-action-observation triple per turn, while a planner emits an ordered list of steps. Keep them as two prompts and pick per job, or run a planner that hands ordered steps to a ReAct executor.
Stop reading. Start shipping.

Get the prompt packs this guide is built on

Ready-to-paste prompts with documented variables and usage guides for ChatGPT, Claude, and Gemini. One-time payment, own it forever.