Free sample lesson · ReAct: Teaching AI to Reason and Act
Reasoning Alone Is Brittle
Why can a brilliant plan fail after one wrong webpage click?
Lesson 1 of the Wondering course ReAct: Teaching AI to Reason and Act
The Plan That Breaks
A language model writes a confident plan: search, filter, open the product, compare prices.
Then one click returns a page that does not match the plan.
The model keeps going anyway. Nothing in its head told it the world had changed.

Notice that the plan on the left keeps its original order while the page on the right has already changed, so nothing corrects the mismatch.
This is the gap between thinking about a task and doing one.
What A Reasoning Trace Does
A reasoning trace is the model's intermediate thinking written out before or between actions.
It tracks the goal, the constraints, the subgoals, and the candidate next step.
Chain-of-thought prompting is one familiar version of this.
- Reasoning trace: Intermediate thoughts written before acting.
- Goal: What the task is ultimately for.
- Constraints: Limits the answer must respect.
- Subgoals: Smaller steps that build toward the goal.
- Next step: The candidate action to take now.
Traces are useful because they expose assumptions. Someone can read them and see where the plan came from.
Fluent Is Not Correct
Here is the trap. A trace can be detailed, well organized, and completely wrong.
Fluency is not evidence. The model may be planning, tracking what it has learned, or quietly rationalizing a choice it already made.
Reading traces well means asking which of those three is happening.
- Planning
- State tracking
- Rationalizing
A rationalizing trace looks the most convincing and helps the least.
Why Plans Go Stale
Interactive environments disagree with plans constantly.
A web page changes layout. A search result comes back irrelevant. A command fails. A required fact is simply missing.
None of these appear in the model's head. They only appear in what the environment returns.
- Environment surprises
- Page changes layout: The control the plan targeted is no longer where it was.
- Irrelevant search result: The returned items do not match what the plan assumed.
- Command fails: The action does not execute at all.
- Required fact missing: The information the plan depends on is not present.
None of these are visible from inside the plan alone.
So a longer, more careful plan written up front does not remove the need to look.
Reason, Act, Observe, Revise
ReAct's proposal is simple. Interleave reasoning traces with task-specific actions instead of studying them separately.
The trace induces a plan. An action tests it. The observation comes back. The trace updates.
That last arrow matters most. Reasoning traces help track and update plans and handle exceptions.
- Reason: Write a trace holding goals, constraints, and a next step.
- Act: Take one task-specific action in the environment.
- Observe: Read what the environment actually returned.
- Revise: Update the plan or handle the exception before acting again.
Without the return trip, an agent is just narrating.
Where Each Half Fails Alone
Reasoning without acting is brittle because the world can disagree with the plan.
Acting without reasoning is brittle because actions need goal-directed selection.
There are honest boundaries here. A pure essay answer can reason with no actions at all.
- Reasoning alone
- Acting alone
A one-click macro can act with no reasoning at all. Neither is an agent operating in a changing environment.
Diagnosing A Failure
When a computer-use agent fails, the useful question is which part broke.
Was reasoning missing, so the action had no goal behind it? Was observation missing, so the agent never saw the result?
Or was revision missing, so it saw the mismatch and continued anyway?
- Agent fails
- Goal behind action?
- Missing reasoning: The action had no goal-directed selection.
- Result observed?
- Missing observation: The agent never saw what the environment returned.
- Plan updated?
- Missing revision: It saw the mismatch and continued anyway.
- Next action
The shopping agent that opens the wrong product and keeps comparing prices failed at revision, not at planning.
Check yourself
Is a fluent reasoning trace automatically correct?
- Yes
- No
Answer: No
No. Fluency and detail show how convincing the text sounds, not whether its assumptions or conclusions match reality.
In the ReAct cycle, the agent first _____ about a goal, then _____ in the environment, _____ the returned result, and _____ the plan.
Answer: In the ReAct cycle, the agent first reasons about a goal, then acts in the environment, observes the returned result, and revises the plan.
ReAct connects internal planning to external feedback: reason, act, observe, and revise. Revision lets the agent respond when the environment differs from its expectations.
A shopping agent writes, “The filter will show the cheapest shoes,” before clicking anything. What is this reasoning trace mainly doing?
- Planning a next step from an assumption
- Tracking a result already observed
- Rationalizing a choice after it was made
- Revising the plan after an error
Answer: Planning a next step from an assumption
The trace is planning because it proposes a next step and predicts an outcome before receiving environmental feedback. The prediction may still be wrong.
Keep going
This is lesson 1 of 6 in ReAct: Teaching AI to Reason and Act. Next up:
- Thought Action Observation
- Actions Gather Evidence
- Sparse Reasoning Beats Chatter
- Tools Are Environments
- Benchmarks Reveal Agent Gaps
Wondering turns any topic into short lessons you can read, watch, or listen to, with practice questions and an AI tutor.