The ReAct Pattern

Interleave reasoning and action instead of separating them. The idea behind the modern agent loop, why it beats reasoning alone, and where it strains.

On this page

Before agents were a product category, there was a simple observation: a model that thinks and a model that acts both fall short, and interleaving the two beats either alone. That idea is ReAct — reasoning and acting — and it is the conceptual ancestor of the agent loop you build today.

Understanding ReAct as an idea, separate from any framework, explains why the loop is shaped the way it is.

Two half-solutions

Consider a question that needs external information: “Which of these three libraries had the most recent release?”

Reasoning alone (chain-of-thought) lets the model think step by step, but it has no way to check anything. It reasons from whatever is in its parameters, which may be stale or absent. It can produce a beautifully argued wrong answer.

Acting alone — issuing tool calls with no reasoning between them — fixes the information problem but creates a new one. Without reasoning, the model has no way to interpret a result, decide it was unhelpful, or adjust course. It fires actions blindly.

Each half fails where the other succeeds. Reasoning has judgment but no grounding. Acting has grounding but no judgment.

The interleave

ReAct combines them into a repeating cycle:

Thought: I need to find each library's latest release date.
Action:  search("library A latest release")
Observation: A released v3.1 on 2026-08-14
Thought: One down. Now B.
Action:  search("library B latest release")
Observation: B released v2.0 on 2026-05-02
...
Thought: A is the most recent of the three.
Answer: Library A.

Thought is the model reasoning about what to do next, in plain language. Action is a tool call. Observation is the result, fed back in. Then another thought, conditioned on what the observation revealed.

The power is in the feedback. Each thought is written after seeing the last observation, so reasoning stays grounded in real results rather than running open-loop. The model can notice a search returned nothing and try a different query — a correction that neither half-solution can make.

Why the thought step earns its tokens

It is tempting to strip the “Thought” lines to save tokens and just emit actions. Usually a mistake, for two reasons.

First, the same mechanism that makes chain-of-thought work applies: each reasoning token is another forward pass, and generating a plan in words measurably improves the action that follows it. The thought is not decoration — it is computation that shapes the next choice.

Second, the thought is your window into the agent’s decision. When a run goes wrong, the trace of thoughts is what tells you why it chose a bad action. Strip them and you are debugging blind.

From ReAct to the loop you build

The modern agent loop is ReAct with the reasoning moved inside the model rather than forced into a rigid text template.

Early ReAct prompted the format explicitly with few-shot examples: literally show the model “Thought:/Action:/Observation:” cycles and let it continue the pattern. Today, models are trained to produce reasoning and structured tool calls natively, so you rarely hand-write the template. But the shape is identical — think, act, observe, repeat until done. When you read the fifteen-line loop, you are reading ReAct with the scaffolding absorbed into the model and the tool-calling API.

This is why ReAct is worth knowing even though you will not implement it by hand: it names the principle the loop embodies.

Where it strains

ReAct is a foundation, not a finished answer, and its limits are the reason more structure exists on top of it.

No lookahead. ReAct decides one step at a time. It does not plan several moves ahead, so it can walk into dead ends that foresight would avoid. When a task needs a plan before acting, multi-step planning sits above ReAct rather than replacing it.

Reasoning drift. Over a long run, the thoughts can wander from the original goal — the same context-growth problem the loop faces. Restating the objective helps.

Compounding failure. ReAct inherits the arithmetic of the loop: each step is a chance to go wrong, and reliability compounds downward over many steps. More reasoning per step does not fix a bad exponent.

Verbosity cost. Every thought and observation is tokens, resent each iteration. The clarity ReAct buys is not free.

None of these are refutations. They are the map of what you build around ReAct: planning for lookahead, memory for drift, reliability patterns for compounding failure.

What to remember

  • ReAct interleaves reasoning and action, fixing the blind spots of each: reasoning alone lacks grounding, acting alone lacks judgment.
  • The cycle is Thought → Action → Observation → repeat, with each thought conditioned on the latest observation, enabling mid-task correction.
  • The reasoning step earns its tokens — it improves the next action and gives you a debuggable trace.
  • The modern agent loop is ReAct, with the reasoning template absorbed into trained models.
  • It has no lookahead and inherits compounding failure — the reason planning and reliability layers sit on top of it.

Next: Agent Architectures