Why it matters
A model reasoning without tools confabulates details it cannot know: current values, file contents, API results. A model acting without reasoning picks tools by surface pattern and repeats failures. ReAct showed that alternating the two lets each observation correct the reasoning, which is the mechanism behind most tool-using agents today.
Mental model
ReAct is a technician working with a multimeter: hypothesise, measure, revise. The metaphor breaks because a technician knows which probe to touch and when a reading is implausible, while the model chooses the next action from text alone and can misread a plausible-looking observation.
How it works
Keyed transitions
- Think → Thought only: 3 thoughts no action
Event · step 1 of 10
Task with tools
Entry: the question plus four tools, each description saying when to use it and what it returns. Nothing is dispatched; the loop has not spent a token or a step.
In state
- Task
Next: Thought 1
- Tool calls
- 0
- Thoughts
- 0
- Identical
- 0
Figure. Eight states. Each thought proposes at most one action, and the observation must arrive before Ground can revise or answer. Halt is the guard that stops an identical action from repeating; Thought only is the cap on reasoning with no tool call. The revise edge back to Think is the normal loop, not a retry.
What to notice. The 12-step cap, the three-repeat window, the order id and the 30-day refund window are illustrative. Observation quality is a separate axis: an empty but well-formed observation would still pass the non-empty guard here, which is why the page covers shape separately. Parallel tool calls, streaming and multi-turn memory are omitted.
Text version
A state machine with eight states. Task is the start, a pill. Task goes to Think on tools plus question. Think goes to Act on one action, and to Thought only, a red failure box, on three thoughts with no action. Act goes to Observe on a valid call. Observe goes to Ground on evidence. Ground has a repeat edge back to Think labelled revise, a normal edge to Answer labelled predicate holds, and a red dashed failure edge to Halt labelled same args times three. Answer is a terminal pill. The trace walks Task, Think, Act, Observe, Ground, Think, Act, Observe, Ground, Answer, then a repeat halt, then a thought-only drift. Counters show tool calls rising to 2 on the success path, thoughts to 2, and three identical calls at the halt.
- Provide a small toolset whose descriptions state when to use each tool and what it returns.
- Prompt for a short thought and one action, then wait for the observation before continuing.
- Return observations in a compact, structured form so exact values can be quoted.
- Stop on a success predicate or a budget, never on the model's claim that it is done.
- Record each thought-action-observation triple so a wrong conclusion traces back to a step.
- Test with a tool that returns an error, because recovery is where the loop usually breaks.
Trade-offs
| Choice | Good for | Cost | Fails when |
|---|---|---|---|
| ReAct loop | Grounded, adapts to new information | More tokens and latency per step | The task needs one deterministic call |
| Single-shot answer | Cheap and fast | No grounding in live data | The answer depends on current state |
| Plan then execute | Fewer model calls, clear structure | Cannot react to surprises | Observations change the plan |
| Long reasoning per step | Better local decisions | Cost and drift into speculation | The latency budget is tight |
Good for
Grounded, adapts to new information
Cost
More tokens and latency per step
Fails when
The task needs one deterministic call
- The task needs one deterministic call
- The answer depends on current state
- Observations change the plan
- The latency budget is tight
Figure. Each choice with what it buys, what it costs, and the case where it loses.
What to notice. The fourth column is the decision: if the losing case describes your situation, the choice is wrong.
Text version
Four trade-offs: ReAct loop is good for Grounded, adapts to new information, costs More tokens and latency per step, and fails when The task needs one deterministic call. Single-shot answer is good for Cheap and fast, costs No grounding in live data, and fails when The answer depends on current state. Plan then execute is good for Fewer model calls, clear structure, costs Cannot react to surprises, and fails when Observations change the plan. Long reasoning per step is good for Better local decisions, costs Cost and drift into speculation, and fails when The latency budget is tight
Failure modes
- Observation ignored. The model repeats a search whose result it already has. Debug: check whether the next action duplicates a prior one with identical arguments.
- Reasoning without action. The trace grows with speculation and no tool is called. Debug: count steps with no tool call and cap consecutive thought-only turns.
- Loop on a failing tool. The same call is retried with identical arguments after an error. Debug: hash action arguments per run and halt on the third repeat.
In production
Track steps per task, tool calls per step and the rate of repeated identical actions. Cap the loop and surface the cap to the user rather than returning a partial answer silently.
Common misconceptions
People think: ReAct makes the model truthful.
Actually: It gives the model evidence; whether it uses that evidence correctly is a separate failure mode.
People think: More reasoning tokens improve tool use.
Actually: Long ungrounded thoughts increase cost and can entrench a wrong hypothesis before any observation arrives.
Interview angle
Strong answers describe the observation as the correction signal, then discuss what happens when it is empty, wrong or truncated, and where the loop is bounded. Weak answers recite the acronym and never mention that the pattern depends on observation quality.
Sources
- Yao et al., ReAct: Synergizing Reasoning and Acting in Language Models — the original interleaved reason-act-observe loop.
- Anthropic, Building effective agents — the loop in practice, with grounding from tool results and explicit stopping.