Skip to main content

ReAct or plan-and-execute: choosing the loop for your AI agent

ReAct decides each step as it goes; plan-and-execute writes the plan first. How to choose the loop for an enterprise AI agent, and when a hybrid fits better.

Share -
A woman in a dark suit points one finger at a glowing data sphere and floating interface icons against a dark teal background streaked with cyan light.

Choose ReAct when each step of the task depends on what the last step found, and plan-and-execute when the steps are knowable up front and need checking before anything runs. ReAct adapts but is harder to predict and audit. Plan-and-execute is easier to review and cheaper per step, but needs a clear rule for when to replan.

What the two loops actually do

Both patterns give a language model tools and let it work towards a goal. The difference is where the plan lives.

A ReAct agent (reason and act) thinks, calls a tool, reads the result and decides the next step, over and over until it is done. The plan is never written down. It is recomputed on every turn from everything in the context so far.

A plan-and-execute agent splits that work. A planner call reads the goal and writes an explicit list of steps. An executor then works through the list, often with a smaller model or plain code for each step. The planner is called again only if a step fails or the results show the plan no longer fits.

Neither is more "agentic" than the other. They make different trade-offs between flexibility and control, and the right choice depends on the shape of the work.

Where ReAct fits

ReAct suits work where you cannot know the second step until you see the result of the first:

  • Investigation and troubleshooting, where each log line or query result changes what to look at next.
  • Open-ended research across documents or systems where the useful sources only appear along the way.
  • Short conversational tasks with one or two tool calls, where a separate planning call adds delay for no benefit.

The costs show up as tasks get longer. Every turn re-reads a growing context, so latency and token spend climb with each step. Behaviour is harder to predict, because the agent can change direction at any point. And without a hard step limit, a ReAct agent is the pattern most likely to run in a loop that never reaches an answer.

Where plan-and-execute fits

Plan-and-execute suits work with a known structure and dependencies:

  • Multi-step business processes such as onboarding a supplier, preparing a report or processing a claim, where the steps are familiar even if the data changes.
  • Regulated or high-impact actions, where someone needs to see what the agent intends to do before it does it.
  • Long tasks, where carrying the full reasoning history through every step becomes slow and expensive.

The written plan is the main advantage for an enterprise. You can log it, show it to a reviewer, compare it with an allowed list of steps and keep it with the audit trail. An approval can happen once at the plan stage, which is often a better place for a human check than on every individual tool call.

The weakness is rigidity. A plan made from incomplete information can be wrong by step two, and an executor that follows it blindly will complete the wrong task neatly.

The replanning rule decides whether it works

Most plan-and-execute failures come from the replanning rule, not the plan. Too strict, and the agent pushes on after a step returns something unexpected. Too loose, and it replans after every step, which turns it back into a ReAct loop with an extra planning call on top.

Set explicit triggers instead:

  • A step fails or a tool returns an error the executor cannot handle.
  • A step's output does not match the shape or range the plan expected.
  • New information arrives that a step marked as a precondition, such as an approval being refused.

Cap the number of replans per task, and treat hitting that cap as a reason to stop and escalate, not to keep trying.

The hybrid most teams end up with

In production, the two patterns are usually combined. A planner sets out the high-level steps, and each step runs as a small, bounded ReAct loop with its own tools and its own step limit. The plan gives you structure and an approval point. The inner loops handle the parts that genuinely need to adapt.

This also maps well onto agents that hand work to other agents: the planner acts as the coordinator, and each step can be handed to a specialist with only the tools that step needs. Keep the plan as the record of who is accountable for each step.

How to decide for your agent

Ask four questions about the task:

  1. Can a person write the steps down before starting? If yes, start with plan-and-execute.
  2. Does someone need to approve what the agent will do? If yes, you need an explicit plan to show them.
  3. Does each result change what happens next? If yes, at least that part needs a ReAct loop.
  4. How long is the task? The longer it runs, the more a written plan saves on context, latency and cost.

Whichever loop you choose, test it the same way. Run the agent against realistic tasks, including ones where a step fails half way, and check that your evals cover replanning and stopping, not only the happy path.

If you are deciding how an agent should plan and act inside your own systems and want a second view, talk to our team.

Frequently asked questions

What is the difference between ReAct and plan-and-execute?

A ReAct agent reasons, calls a tool, reads the result and picks the next step in a repeating loop, so its plan is never written down. A plan-and-execute agent first asks a planner to write an explicit list of steps, then an executor carries them out, calling the planner again only when something goes wrong. ReAct adapts more easily, while plan-and-execute is easier to review, audit and run on long tasks.

Is plan-and-execute better for enterprise AI agents?

It often fits enterprise processes well, because the written plan can be logged, compared with allowed steps and approved before anything changes in a live system. That does not make it right for every task. Troubleshooting, research and other work where each result changes the next step still needs a ReAct loop. Many production agents use a written plan for structure and short ReAct loops inside individual steps.

When should a plan-and-execute agent replan?

Replan when a step fails, when its output does not match what the plan expected, or when new information breaks a step's precondition, such as a refused approval. Avoid replanning after every step, because that turns the agent back into a ReAct loop with an extra call on top. Set a cap on replans for each task and escalate to a person when the agent reaches it.

Does a ReAct agent cost more to run?

On longer tasks it usually does. A ReAct agent sends the growing context to the model on every turn, so each step costs more than the one before and the total delay builds up. Plan-and-execute pays for one planning call, then runs steps with smaller prompts or cheaper models. For short tasks with one or two tool calls, the extra planning call can make plan-and-execute slower instead.

Share this post

Contact us to build the right product

Talk to our engineers about your application, the systems it connects to, and what you want to build next.

Get in touch
Two people discussing work with a laptop