What is replanning?
Replanning is the process of revising an agent's remaining plan when the current plan is no longer the best or valid way to reach the goal.
The agent keeps the same overall objective but changes future steps based on new information.
A simple example
Suppose an agent plans:
- find a flight
- book the selected flight
- send confirmation
But the booking tool returns:
“Flight no longer available.”
Instead of repeating the same failed step, the agent can replan:
- search for alternative flights
- compare available options
- choose or ask the user to choose
- continue booking
The goal is still to book a flight, but the route changes.
What can trigger replanning?
Common triggers include:
- a tool call fails
- required data is missing
- a resource becomes unavailable
- permissions change
- the user changes a constraint
- a new observation invalidates an assumption
- a better path becomes available
- a dependency cannot be satisfied
Replanning should happen because something meaningful changed.
Replanning usually changes only the remaining work
Completed steps do not normally need to be repeated.
For example:
- customer identified — completed
- report generated — completed
- email send — failed
The agent should usually replan around the email step instead of regenerating the report.
This saves time and avoids duplicate actions.
Replanning is different from retrying
A retry attempts the same action again.
Example:
send_email → timeout → send_email again
Replanning changes the approach.
Example:
send_email → service unavailable → use approved backup delivery method
Retrying is useful when the action is still correct but failed temporarily.
Replanning is useful when the current path itself should change.
Replanning may add, remove, or reorder steps
A revised plan may:
- add a missing validation step
- remove work that is no longer necessary
- replace an unavailable tool
- reorder actions
- choose another branch
- request user input
- introduce an approval step
For example:
Original plan: validate → execute
After discovering approval is required:
New plan: validate → request approval → execute
Replanning should use the latest state
The agent should consider:
- completed steps
- current tool outputs
- known failures
- available tools
- permissions
- user preferences
- current constraints
It should not rebuild the plan from outdated assumptions.
Replanning needs limits
An agent should not replan endlessly.
Useful controls include:
- maximum replan count
- execution deadline
- cost budget
- retry limits
- stop conditions
- human escalation
If several replans fail to make progress, the safest action may be to stop or ask for help.
High-impact actions require extra care
If the revised plan introduces a sensitive action, existing authorization rules still apply.
For example, replanning must not turn:
read order status
into:
cancel order
without the required permission or approval.
Changing the plan does not bypass security boundaries.
Replanning can improve recovery
Without replanning, an agent may become stuck on a failed path.
With replanning, it can ask:
“Given what I now know, what is the best valid next path toward the goal?”
That makes the system more resilient to changing conditions.
In short
Replanning is the process of updating an agent's remaining steps when new information makes the current plan incomplete, invalid, or inefficient.
It differs from retrying because replanning changes the path, not merely repeats the same action. Good replanning preserves completed work, respects permissions and constraints, and has clear limits to prevent endless loops.
Learning Sequence
AI Agents Curriculum
Explore Related Questions
Deepen your understanding across related AI Agents topics.