Skip to content
Agent Field Notes
Course contentsExpand a topic to choose a lesson.

SYSTEMATIC LEARNING / FOUR-LEVEL COURSE

Separate plan revisions from external facts

Examine dynamic plans, completed side effects, dependencies, and acceptance invariants.

Learning objectives: 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.

Content checked: 2026-10-03 · Each level has independent explanations, tasks and inspections

Choose a starting point based on your familiarity with this topic. Current level: Implementation · Build it. After completing the task, continue to the next level. Reading and self-checks alone do not establish mastery.

On this level

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
  1. 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.

  2. Which artifacts can be reused?

    Reuse requires a validity judgment, not just a completion flag or sunk-cost argument.

  3. How does it end when the plan changes five times in a row?

    Allowing revisions also requires protection against loops that make no progress.

Implementation · Build it

Implement the contract · Separate plan revisions from external facts

Objectives of this level: Be clear about the separation of goals and plans, and know that external facts cannot be undone.

Visual guide · Revise the future, retain the past

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.

What situations deserve re-planning?

Divide triggering reasons into environmental changes, failure of an original assumption, temporary unavailability of tools, and goal clarification. If the network fails temporarily, you can retry in a controlled manner without generating a new plan every time; if you find that the target account does not exist, you need to re-confirm the entity or stop. The plan includes step IDs, dependencies, input versions, completion criteria, and whether side effects can occur, making it easy to determine which parts are failing.

Freeze the facts and adjust the remaining work

Pause new actions at the security boundary and read the operation ledger. The fact that an email has been sent is an external fact and cannot be "undone" through the deletion step. For requests whose outcome remains unknown after a timeout, check the receipt first. Completed artifacts can only be reused if the dependencies have not changed; for example, after the measurement definition changes, the old summary figures should be marked as expired, but the original counting evidence can still be retained.

How to handle versions and approvals

When generating plan_v2, record the differences relative to v1 and save the reason for the replacement. Approval should be bound to specific actions to be executed and parameter versions; the new plan only changes the display order and the actions remain unchanged. Approvals can be reused according to the established strategy. If the amount, recipient or content changes, the approval will be re-entered. The final state is determined by the original business acceptance, and the acceptance conditions cannot be secretly lowered in order to complete the plan.

Prevent infinite re-planning

Set a replanning budget, identify recurring failure fingerprints, and define termination conditions. When both plans require the same unavailable tool, the reason for the blockage should be given or clarification requested. In the test, the data injected in the second step becomes invalid, the write request is unknown in the third step, and the parameters are modified after approval. It is checked that the system has no repeated side effects, and the user can trace each plan change.

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

A three-step plan is given: fetch data, generate reports, and publish; modify the measurement definition after generation to mark which states are invalid.

Acceptance self-checks

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?

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.