Replanning
What is replanning?
Replanning is the process of revising an existing plan when new observations, failures, or changed constraints make the current path unsuitable. It allows an AI agent to adapt without abandoning the original goal.
The plan changes because the agent’s understanding of the task or environment has changed.
When replanning happens
An agent may replan when:
- a required tool or data source is unavailable;
- an earlier assumption proves false;
- a task takes longer or costs more than expected;
- a user changes a constraint;
- a completed step produces an unexpected result;
- a better route becomes available.
For example, a travel agent may plan to compare direct flights, discover that none fit the budget, and revise the plan to evaluate one-stop options after confirming the user’s preference.
Replanning versus planning
Planning creates the current path toward a goal. Replanning modifies that path during execution. It should preserve confirmed constraints and completed work where possible instead of starting over blindly.
Good state management is important because the agent needs to know what has already happened, which dependencies changed, and which outputs remain valid.
Replanning versus reflection and retry
Reflection evaluates progress or results and may detect that the plan is failing. Replanning is the resulting change to future tasks, order, or strategy.
Retrying repeats an action. Replanning may choose a different tool, divide the task differently, remove an impossible step, or ask for clarification. A transient timeout might justify a retry; repeated permission failure requires a new plan or escalation.
How to replan safely
The agent should identify what changed, which assumptions are invalid, and how the revision affects dependencies, cost, permissions, and stopping conditions. It should not discard successful results unless they are no longer trustworthy.
High-impact plans may require user approval after a material change. Replanning should also have limits; an agent that continually rewrites its plan can consume resources without making progress.
Common failure modes
The agent may react to one noisy observation, change direction too often, or preserve a faulty subgoal. It may also create a new plan that violates the original request.
Checkpoints, explicit constraints, progress tracking, and bounded retries help distinguish real plan failure from temporary execution noise.
Why it matters
Real environments rarely follow a perfect initial plan. Replanning gives agents resilience when tools fail, data changes, or new information arrives.
The objective is controlled adaptation: update the path while preserving the goal, verified work, and safety boundaries. See [Planning in AI Agents](/planning-in-ai-agents/) for the complete execution and replanning cycle.
Learn More
Planning in AI AgentsContinue with the full AIRundown guide →