H-02Tool Loop / ReAct

/harnesses/react

The model alternates reasoning with tool calls, folding each observation back into context until it can answer.

Step-by-step walkthrough7 steps
  1. The task lands in context.
  2. Loop 1 — the model reasons, then picks a tool call.
  3. The environment executes it and returns a result.
  4. The observation is appended to context. Reason again.
  5. Loop 2 — same cycle, now with more evidence in context.
  6. Act → observe → append. Each loop is a full model call.
  7. Enough evidence. The model exits the loop and answers.
Key insight

The loop converts a static predictor into something that can gather its own evidence. Nearly every modern agent is a descendant of this cycle.

Failure mode

Unbounded loops: without a step budget and a stopping rule, an agent that cannot solve the task will happily keep observing forever.

Further reading

Elsewhere in the atlas