Review the prerequisites
Suitable for: Backend developers learning Agent applications.
- Separate plan revisions from external facts
- Plans are modifiable assumptions about future actions, and ledgers are facts that have already occurred. Replanning can only adjust the remaining work; when the goals, dependencies, or parameters change, the artifact and approval should be invalidated along with the dependencies, and cannot be undone by deleting the plan.
How does the mechanism work?
Step-by-step explanation
- If the new plan deletes the steps that have already been paid, how will the system status be displayed?
Replanning tends to confuse future action lists with past facts.
- Which artifacts can be reused?
Reuse requires a validity judgment, not just a completion flag or sunk-cost argument.
- How does it end when the plan changes five times in a row?
Allowing revisions also requires protection against loops that make no progress.
Foundation · Understand the concepts
Understand the principle · Separate plan revisions from external facts
Objectives of this level: Plans are modifiable assumptions about future actions, and ledgers are facts that have already occurred. Replanning can only adjust the remaining work; when the goals, dependencies, or parameters change, the artifact and approval should be invalidated along with the dependencies, and cannot be undone by deleting the plan.
Visual guide · Revise the future, retain the past
A plan revision changes remaining work, not committed effects. Compare actual action semantics for approval reuse and bound repeated replanning. Select the figure to open it at full size.
A plan is not an execution ledger
An agent can edit its own checklist, so the checklist cannot also establish what happened. Removing a payment from plan v2 does not return the money. A timed-out action cannot simply disappear from the failed-step list.
Replan from changes in assumptions
Distinguish transient network errors from invalid premises. The former may need an idempotent retry; the latter may require changed dependencies or steps. Record additions, removals, and parameter changes, then invalidate dependent artifacts. Budget repeated replanning on unchanged evidence; thinking again does not necessarily advance the task.
Approval binds an action, not a plan name
Moving from v1 to v2 neither invalidates nor inherits every approval automatically. Compare actual actions, targets, and content versions. Reordering reads may preserve approval; changing a recipient, publication text, or amount requires reassessment under the approval policy. The application contract determines reuse.
ReAct and Plan-and-Execute: when is the next action chosen?
ReAct interleaves action selection with observations. After a tool result, the next model round can choose a different action. The original ReAct paper describes this interaction; applications need not expose private reasoning to users.
Plan-and-Execute first produces an explicit plan, then executors carry out steps and a replanner checks whether to finish or revise remaining work. Executors may themselves contain bounded tool loops. LangChain's planning example illustrates the separation. It is not a promise of lower cost or higher success for every task.
Use one after-sales case: alice asks to return her unused order o-100. A ReAct-style design reads the order, observes its item and age, then chooses the relevant policy lookup. A planning design records order lookup → policy evidence → proposal → review → execution, with dependencies and expected outputs, before executing those steps. In both designs, the runtime must enforce current ownership, evidence, approval and receipt checks. A plan is a candidate strategy, not permission.
These are authored design traces. This course has not run ReAct against a separate Plan-and-Execute implementation or measured their relative performance.
code example
You only need to change the display order
Plan changes do not change artifact content or writing actions
Can old approvals be retained?
If the policy approves fixed artifacts and goals, and the sequence change does not change the external behavior, it can be retained after comparing the digest. If the sequence affects payment, dependency or resource occupation, it itself belongs to action semantics and needs to be re-examined. It is clear which fields affect approval and cannot be judged by the plan version number.
Approval validity is determined by actual action invariants.
Acceptance task for this level
Keep the original three-step state exercise; additionally draw the same o-100 return request as action/observation rounds and as plan/execution/replanning. Mark where authorization and business receipts are checked.
Reading this browser’s record…
Hide the answer and check your understanding
If the new plan deletes the steps that have already been paid, how will the system status be displayed?
Expand reference derivation
This step in the plan can be marked as "no further required", but the ledger retains the payment success, amount, target and receipt. If the new target requires a refund, create a compensation action associated with the original payment, and go through refund permission and acceptance. The final status of the task also indicates that the payment has been made and is pending refund, and the deletion step cannot be interpreted as payment being revoked.
Further explanations and practice
When encountering unfamiliar principles, first read the implementation, continuous questioning and migration cases, and then independently explain the premise and boundaries. Answers and notes are saved to the original account record.
All linked explanations and exercises (1 )
Sources and verification scope
The principles are based on public information; the numbers, cases and tasks are the teaching design of this website. Offline experiments verify the range noted on this page, and the learning effect still needs to be judged through independent tasks and feedback.