Chapter 6: Action: How your agent acts is where strategy meets consequences
The introduction shows why a state-changing agent action must be judged by its bounded, verified real-world effect rather than by a successful tool response.
After this chapter you will be able to
- Verified task outcomes. Explain why a successful tool response does not establish that an agent completed the requested task, using the map-layer example.
- Bounded payment effects. Explain how the payroll example shows that an agent must check the actual effects of a state-changing action against what was authorized, rather than follow instructions in task data or trust a status display.
- Action in the PRA loop. Explain that reasoning proposes what should happen next, while Action turns that proposal into an interaction with an external system.
- Effects and acceptance signals. Distinguish making a tool call from completing a task: completion depends on the resulting effect and the acceptance signal defined for that task. Explain why a model's claim, a successful process exit, or a passing unit test is only intermediate evidence.
- Task-Specific Acceptance Evidence. Explain why a simple SUCCESS value or the agent’s account cannot establish completion, and describe how acceptance evidence depends on the domain.
- Proposal to effect gap. Explain why a well-formed function call does not by itself establish that an action produced the authorized business result.
- Practical action contract. Describe the information an action contract connects to a proposal: the intended effect and permitted boundary, the state and execution conditions, a retry-stable commit identity, and evidence of acceptance.
- Effect Based Action Risk. Explain why step count is a weak measure of action risk and describe the effect-based questions the section uses instead.
- Task-Driven Action Pattern Selection. Explain why the four Action patterns are not mandatory layers and how different tasks can call for different combinations.
- Accepted External Effect. Explain what counts as success for an action and how available evidence relates to that judgment.
- Checked Stage Handoffs. Explain how Prompt Chaining moves through a known sequence of narrow stages, with each stage producing a named artifact that must pass a gate before the next stage receives it. Describe how a gate can send an artifact back for a bounded retry without changing the business route.
- Seam Contracts And Evidence. Describe when Prompt Chaining fits and what to specify at each handoff: a stable order, narrow deliveries, artifact schema and provenance, an acceptance gate, and a retry or escalation path. Explain why an existence-only check is insufficient and name ways to measure whether the chain works.
- Artifact contracts between stages. Describe how named artifacts make each handoff in the code-repair chain unambiguous, from the initial failure through diagnosis, patch, and verification.
- Evidence-limited verification gates. Explain why a gate may establish only what its evidence supports, and why a pull request should depend on gate-passed verification rather than the agent's confidence.
- Gate-controlled artifact propagation. Trace what the chain runner does when an artifact passes or fails its gate, including when retries run out.
- Trusted patch evidence verification. Explain why a patch gate must verify evidence against trusted sources rather than accept a model's judgment or evidence references at face value.
- Information-changing retries. Explain why a gate rejection should change the information or scope given to a retry, rather than prompt the same generation to try harder.
- Stage-specific retry limits. Explain why retry budgets depend on the stage and why a stage that has created an external effect needs something other than an unqualified prompt retry.
- Meaningful stage handoffs. Explain why splitting work into more prompts is useful only when a stage produces an artifact another component can independently accept.
- Validation at observable seams. Explain why a chain should check for a defect at the earliest seam where it can be observed rather than validating only at the end.
- Limits of linear chains. Distinguish a known-route chain from tasks that require capability selection or preservation of partial progress across branches and interruptions.
- Eligible tools before selection. Explain the order of Tool Dispatch: determine eligible tools for the role, task stage, object, and granted authority; let the model select from that set; then admit the selection at the execution boundary.
- Runtime-owned action boundary. Distinguish the model's runtime choice of a route from the runtime's control of the tool registry, eligible set, and path to handlers. Describe why protected arguments require preserving their origin and rechecking authority and freshness at execution.
- Eligible tools before selection. Explain how Tool Dispatch separates the runtime's eligibility decision from the model's choice of an interface, including why irrelevant or impermissible tools are hidden before selection.
- Call validation and admission. Distinguish argument validation from admission of a particular tool call, and explain why a discoverable tool and schema-valid arguments do not suffice for authorization.
- Layered capability disclosure. Explain how a runtime can reveal tool or Skill information in stages to reduce context pressure and selection noise.
- Disclosure versus action authority. Distinguish making a capability visible from granting permission to execute it.
- Action interface priorities. Describe the section's interface preferences and explain why they are priorities rather than guarantees of safety.
- Runtime-owned tool authority. Explain how a tool contract distinguishes an operation's effect from its description, and why the runtime—not the model—supplies granted effects and protected business values.
- Evidence-backed call admission. Explain the checks applied to a selected call before execution, including argument validation and the limits of schema validation.
- Enforced execution chokepoint. Explain why admission must sit on the agent's only execution path and what the dispatcher passes to the executor.
- State-changing retry identity. Trace how a runtime-issued commit identity handles repeated state-changing calls and why an unknown result requires verification before retry.
- Executable tool catalog boundary. Explain why telling the model to use only listed tools is insufficient: the runtime must enforce an executable allowlist that imported content cannot expand.
- Argument admission at execution. Distinguish reducing the set of candidate tools from admitting a particular call, including its arguments. Describe why argument provenance and protected state must be checked at the execution boundary.
- Plan and executor roles. Explain how Plan-and-Execute separates a task-level plan from the executor that advances and records the work, and why a model-written checklist alone is insufficient.
- Unsafe restart decision. Describe when Plan-and-Execute is useful and what information it persists to support progress and recovery.
- Interruption-Based Admission Test. Apply the interruption test to decide when Plan-and-Execute needs a durable execution record instead of relying on step count.
- Durable State and Recovery. Explain what an execution record must distinguish and how those distinctions guide recovery after an uncertain external effect.
- Durable plan references. Explain how a plan can serve as a recovery baseline without storing values that may become stale before execution.
- Verified step completion. Describe when a step is eligible to run and what must happen before it can be marked DONE.
- Local checkpoint persistence. Explain why an in-memory graph cannot recover after its process disappears and how the local JSON checkpoint is written safely.
- Checkpoint recovery limits. Describe what a persistent checkpointer restores and why a resumed run can execute an unfinished task again.
- External commit crash window. Explain how an external service can accept a job before the executor saves its receipt, leaving recovery unable to tell from local state whether the action succeeded.
- Effect verification before retry. Describe how recovery uses the same commit identity to check the external result, then records success, retries a confirmed rejection, or blocks an unresolved step for review.
- Bounded Local Replanning. Explain when an execution failure permits a new route and which parts of the plan a local replan may replace.
- Durable execution state. Explain why a plan kept only in the prompt cannot support reliable recovery after a crash and why state must be persisted outside the model context.
- Evidence-based completion states. Distinguish a function returning from a task being DONE, using the section's examples of work that still lacks acceptance evidence.
- Bounded recovery after failures. Describe how to recover from a local problem without restarting the whole plan.
- Three-stage guarded action. Explain how a trusted pre-check, controlled executor, and trusted post-check surround a state-changing action, and why the pattern is Action × Hierarchy despite running in sequence.
- Risk-based guarded execution. Describe when to use the Guardrail Sandwich and how to keep its controls outside the agent's control, including a guarded facade, request and argument snapshots, and protected business evidence.
- Durable Payment Admission. Explain why the runtime must give every attempt at an authorized payment one durable identity and check its recorded outcome before execution.
- Post-Execution Effect Reconciliation. Describe what the runtime checks after execution and distinguish detecting a duplicate from undoing it.
- Independent Guardrail Trust. Explain the separation of admission, controlled execution, and effect verification, including why the model cannot set or certify its own guardrails.
- Admission and containment controls. Distinguish permission rules and hooks that decide whether a call may run from a sandbox that restricts a process after it starts. Explain why a synchronous hook can block an action but an asynchronous hook cannot block one that has already continued.
- Verification of action effects. Explain why an admitted, sandboxed, or successfully exited command does not establish the requested outcome. Describe how the code-repair flow independently reruns applicable verifiers before opening a pull request, and what that check still cannot prove.
- Registered guard contracts. Explain that required pre- and post-checks belong to the registered tool rather than being supplied by the agent on each call, and that guards return structured evidence.
- Conservative execution outcomes. Distinguish a failed pre-check, an unknown outcome, and a conclusive post-check mismatch. Explain why an ordinary runner exception cannot establish that no external effect started.
- Commit and receipt checks. Explain how the payroll pre-check and post-check verify an attempted payment: the pre-check uses the reserved commit digest, and the post-check requires a settled receipt matching the commit, employee, amount, and payroll version.
- Nonbypassable action controls. Explain why action controls must be enforced at a runtime chokepoint and why effects must be classified from registered contracts rather than tool names alone.
- Containment versus effect verification. Distinguish execution containment and output filtering from verification that the intended business effect occurred. Describe why the execution boundary needs a domain postcondition.
- Failed post-check obligations. Explain why blocking a post-check cannot undo an action that has already run, and describe how to handle its result and unresolved effect.
- Pressure-Driven Pattern Composition. Explain why action patterns should be selected for the effects and failure points of a task rather than applied as a fixed stack.
- Cross-Repository Pattern Roles. Trace how the four action patterns address different parts of the shared-schema change across the schema, client, and service repositories.
- Useful and bounded action. Explain why Action tests must check both legitimate completion and bounded failure, rather than treating safety or speed alone as success.
- Effect-specific evidence bundles. Describe the evidence an Action test should gather for an external effect, and distinguish missing verification from a passing result.
- Boundary failure injections. Describe how to test an Action pattern's claimed boundary by injecting failures at that boundary.
- Guarded tool dispatch path. Trace how Argus exposes eligible tools, admits a selected call against current context, and executes it through registered guards.
- Action attempt evidence. Describe what Argus retains about an attempted action and how that record separates intended work from an accepted effect.
What it builds on
- Set trust boundaries before granting autonomy (chapter 2) · Assumes the need for trust boundaries before an agent is granted autonomy.
- Design the cognitive engine: The Perception-Reasoning-Action loop (chapter 2) · The Perception-Reasoning-Action loop.
- The complete pattern map (chapter 2) · Introduces the two-dimensional pattern map in which this pattern sits at Action × Chain.
- Use the two-axis map to compare pattern choices (chapter 2) · Introduces the two-dimensional framework in which this pattern is placed at Action × Orchestrate.
- What is reasoning? From represented state to an inspectable decision (chapter 5) · Distinguishes reasoning toward a decision from executing the resulting plan.
Section by section
Introduction
The introduction shows why a state-changing agent action must be judged by its bounded, verified real-world effect rather than by a successful tool response.
- Verified task outcomes: Explain why a successful tool response does not establish that an agent completed the requested task, using the map-layer example.
Why it matters: A tool can report success while the result the user actually needs is still wrong. - Bounded payment effects: Explain how the payroll example shows that an agent must check the actual effects of a state-changing action against what was authorized, rather than follow instructions in task data or trust a status display.
Why it matters: A reassuring status can hide an unauthorized duplicate effect.
Key terms: tool call, verified task result, intended viewer, prompt injection, task data, transaction record, authorized payment, actual transfers
6.1 What is action?
Action turns a proposed decision into an external interaction, but completing a task depends on the resulting effect and its task-specific acceptance signal.
- Action in the PRA loop: Explain that reasoning proposes what should happen next, while Action turns that proposal into an interaction with an external system.
Why it matters: This distinction separates deciding what to do from actually interacting with the world. - Effects and acceptance signals: Distinguish making a tool call from completing a task: completion depends on the resulting effect and the acceptance signal defined for that task. Explain why a model's claim, a successful process exit, or a passing unit test is only intermediate evidence.
Why it matters: It prevents a plausible success report from being mistaken for evidence that the intended task actually succeeded.
Key terms: Perception-Reasoning-Action loop, reasoning, Action, external system, tool call, resulting effect, acceptance signal, intermediate evidence
6.1.1 Success has layers
This section explains why an agent’s success report is not proof of completion and why acceptance evidence must fit the task, including read-only work.
- Task-Specific Acceptance Evidence: Explain why a simple SUCCESS value or the agent’s account cannot establish completion, and describe how acceptance evidence depends on the domain.
Why it matters: Checking the outcome requires evidence that matches what the action was meant to accomplish. - Read-Only Work Evidence: Describe what a read-only research workflow still needs to show, and distinguish its evidence gap from the greater risk of state-changing actions.
Why it matters: A workflow needs a checkable result even when it changes nothing, and the stakes rise when it does change something.
Key terms: SUCCESS, acceptance signal, system of record, read-only work, state-changing actions, requested evidence
6.1.2 The action gap
This section defines the gap between proposing an action and establishing an authorized, accepted effect, then introduces the action contract and records that help close it.
- Proposal to effect gap: Explain why a well-formed function call does not by itself establish that an action produced the authorized business result.
Why it matters: It keeps the agent from treating a valid call as proof of an authorized, completed task. - Practical action contract: Describe the information an action contract connects to a proposal: the intended effect and permitted boundary, the state and execution conditions, a retry-stable commit identity, and evidence of acceptance.
Why it matters: The contract makes it possible to judge an action against its allowed effect rather than against the shape of its call. - Contract and attempt records: Distinguish the contract's declared effect from an execution attempt, and explain why its request digest binds admitted arguments to the selected tool and effect.
Why it matters: Separating the intended effect from each attempt preserves what was authorized when execution is uncertain. - Existing authority boundary: Explain why the Action runtime must follow an already-defined authorization boundary rather than expand it based on task data or a useful-looking operation.
Why it matters: This prevents apparently useful actions from crossing the limits under which the agent was allowed to act.
Key terms: action gap, accepted effect, well-formed function call, action contract, intended effect, execution boundary, state basis, execution rule, commit identity, contract
6.1.3 Risk follows the effect
This section explains why action risk depends on an agent’s reachable effects rather than its number of steps or its ability to call a tool.
- Effect Based Action Risk: Explain why step count is a weak measure of action risk and describe the effect-based questions the section uses instead.
Why it matters: It helps you judge controls by the consequences of an action, not the length of the workflow. - Native Tool Calling Limits: Distinguish what native tool calling provides from the action assurances it does not provide by itself.
Why it matters: A correctly delivered tool call is not necessarily an appropriate or safely completed action.
Key terms: effect, shared or durable state, step count, reachable tools, privileges, and effects, native tool calling, schema, transport problem, scope, freshness, idempotency
6.1.4 Four ways to constrain action
This section explains that Action patterns should be chosen for the task rather than stacked by default, and that action succeeds when the task’s external effect is accepted.
- Task-Driven Action Pattern Selection: Explain why the four Action patterns are not mandatory layers and how different tasks can call for different combinations.
Why it matters: Choosing only the patterns a task needs avoids treating action design as a mandatory checklist. - Accepted External Effect: Explain what counts as success for an action and how available evidence relates to that judgment.
Why it matters: A tool return or completed process is not, by itself, proof that the task achieved its intended effect.
Key terms: Action patterns, action gap, Prompt Chaining, Tool Dispatch, Guardrail Sandwich, accepted external effect, acceptance signal, receipts
6.2 Pattern: Prompt Chaining
Prompt Chaining organizes a stable action sequence around named artifacts and gates that check each handoff before work continues.
- Checked Stage Handoffs: Explain how Prompt Chaining moves through a known sequence of narrow stages, with each stage producing a named artifact that must pass a gate before the next stage receives it. Describe how a gate can send an artifact back for a bounded retry without changing the business route.
Why it matters: A checked handoff keeps an unacceptable result from automatically becoming the next stage’s input. - Seam Contracts And Evidence: Describe when Prompt Chaining fits and what to specify at each handoff: a stable order, narrow deliveries, artifact schema and provenance, an acceptance gate, and a retry or escalation path. Explain why an existence-only check is insufficient and name ways to measure whether the chain works.
Why it matters: Explicit acceptance conditions and outcome measures reveal whether the checks prevent errors rather than just add stages.
Key terms: Prompt Chaining, named artifact, gate, Action × Chain, bounded retry, schema, provenance, retry, escalation, downstream escape
6.2.1 The seam is the design surface
This section shows how a prompt chain uses explicit handoff artifacts and evidence-limited gates to keep a code repair from advancing without sufficient verification.
- Artifact contracts between stages: Describe how named artifacts make each handoff in the code-repair chain unambiguous, from the initial failure through diagnosis, patch, and verification.
Why it matters: Explicit handoffs prevent a later stage from guessing which failure or repository state it is acting on. - Evidence-limited verification gates: Explain why a gate may establish only what its evidence supports, and why a pull request should depend on gate-passed verification rather than the agent's confidence.
Why it matters: A repair that passes one check may still break another service, so publication needs evidence appropriate to the claim being made.
Key terms: Prompt Chaining, artifact contract, failure artifact, diagnosis artifact, patch artifact, verification artifact, gate, verification evidence, parser, repository check
6.2.2 Build artifacts before retries
This section shows how a prompt chain packages intermediate artifacts, gates them before downstream use, and verifies patch evidence through trusted sources.
- Artifact and gate records: Describe what an artifact and its gate result contain in the chain runner.
Why it matters: These records give the chain both an identifiable handoff and useful feedback when a gate rejects it. - Gate-controlled artifact propagation: Trace what the chain runner does when an artifact passes or fails its gate, including when retries run out.
Why it matters: The gate prevents an unsuccessful intermediate result from silently becoming the next stage's input. - Trusted patch evidence verification: Explain why a patch gate must verify evidence against trusted sources rather than accept a model's judgment or evidence references at face value.
Why it matters: A cited test run is not proof that the relevant patch actually passed it.
Key terms: artifact, gate result, source references, repair guidance, chain runner, accepted, gate, budget, downstream, patch gate
6.2.3 Retry only when something changes
This subsection explains when a rejected Prompt Chaining stage merits a retry and when retrying is the wrong form of recovery.
- Information-changing retries: Explain why a gate rejection should change the information or scope given to a retry, rather than prompt the same generation to try harder.
Why it matters: New evidence gives the next attempt something specific to correct. - Stage-specific retry limits: Explain why retry budgets depend on the stage and why a stage that has created an external effect needs something other than an unqualified prompt retry.
Why it matters: A remaining retry allowance is not permission to repeat a consequential action.
Key terms: gate rejection, new information path, retry, retry budget, stage, external effect, Plan-and-Execute, Guardrail Sandwich
6.2.4 When Prompt Chaining breaks
This section explains four ways Prompt Chaining fails and how to recognize when to keep stages together, tighten handoffs, validate earlier, or choose another pattern.
- Meaningful stage handoffs: Explain why splitting work into more prompts is useful only when a stage produces an artifact another component can independently accept.
Why it matters: A stage boundary should earn its cost by creating a checkable handoff. - Minimal context handoffs: Describe what to pass between stages instead of the complete prior transcript.
Why it matters: A narrow handoff keeps stages from silently carrying forward every earlier assumption. - Validation at observable seams: Explain why a chain should check for a defect at the earliest seam where it can be observed rather than validating only at the end.
Why it matters: Checking when an error first becomes visible prevents downstream work on the wrong state. - Limits of linear chains: Distinguish a known-route chain from tasks that require capability selection or preservation of partial progress across branches and interruptions.
Why it matters: Recognizing a task that is not naturally linear prevents forcing it into the wrong action pattern.
Key terms: meaningful handoff, artifact, serialization, complete prior transcript, smallest accepted artifact, evidence, end-only validation, earliest seam, old revision, Prompt Chaining
6.3 Pattern: Tool Dispatch
Tool Dispatch lets an agent choose an action capability at runtime while the runtime controls which tools are available and whether the chosen action may execute.
- Eligible tools before selection: Explain the order of Tool Dispatch: determine eligible tools for the role, task stage, object, and granted authority; let the model select from that set; then admit the selection at the execution boundary.
Why it matters: Putting eligibility before selection keeps the model's choice inside the permitted action set. - Runtime-owned action boundary: Distinguish the model's runtime choice of a route from the runtime's control of the tool registry, eligible set, and path to handlers. Describe why protected arguments require preserving their origin and rechecking authority and freshness at execution.
Why it matters: A model-selected route should not become an uncontrolled way to invoke tools or use protected state.
Key terms: Tool Dispatch, eligible set, model selection, admission, Action × Route, executable surface, registry, handlers, authority, freshness
6.3.1 Eligibility comes before selection
This section explains how Tool Dispatch limits what an agent may choose before the model selects a tool, then checks the proposed call before execution.
- Eligible tools before selection: Explain how Tool Dispatch separates the runtime's eligibility decision from the model's choice of an interface, including why irrelevant or impermissible tools are hidden before selection.
Why it matters: Limiting the choices first prevents the model from treating every available capability as appropriate for the task. - Call validation and admission: Distinguish argument validation from admission of a particular tool call, and explain why a discoverable tool and schema-valid arguments do not suffice for authorization.
Why it matters: A tool can be eligible in general while a specific call remains unsafe or unauthorized.
Key terms: Tool Dispatch, eligible surface, Minimal Tool Set, admission, authority, provenance, state freshness, protected task state
6.3.2 Reveal capability in layers
This section explains how to reveal tool capabilities without overloading context and how to choose an action interface without confusing visibility with permission.
- Layered capability disclosure: Explain how a runtime can reveal tool or Skill information in stages to reduce context pressure and selection noise.
Why it matters: Staged disclosure makes a large catalog easier to search without crowding the model's context. - Disclosure versus action authority: Distinguish making a capability visible from granting permission to execute it.
Why it matters: A visible tool must not be mistaken for an authorized action. - Action interface priorities: Describe the section's interface preferences and explain why they are priorities rather than guarantees of safety.
Why it matters: Choosing an inspectable interface helps the runtime check an action without assuming that any interface is automatically safe.
Key terms: context pressure, selection noise, tool or Skill contract, progressive disclosure, progressive authority, admitted, eligible, executable, typed API, admitted Skill
6.3.3 Build the executable surface
This section shows how Tool Dispatch turns tool selection into a controlled execution path with runtime-owned authority, admission checks, and safe handling of uncertain state-changing calls.
- Runtime-owned tool authority: Explain how a tool contract distinguishes an operation's effect from its description, and why the runtime—not the model—supplies granted effects and protected business values.
Why it matters: A tool call is only as constrained as the authority and business values the runtime keeps out of the model's control. - Registry-controlled candidate selection: Describe what the registry gives a selector and why selecting a plausible tool name does not itself provide an executable function.
Why it matters: Keeping the candidate list separate from executable access prevents a convincing tool name from becoming a capability. - Evidence-backed call admission: Explain the checks applied to a selected call before execution, including argument validation and the limits of schema validation.
Why it matters: A well-formed tool call can still target the wrong value or rely on stale evidence. - Enforced execution chokepoint: Explain why admission must sit on the agent's only execution path and what the dispatcher passes to the executor.
Why it matters: Checks do not protect an effect if the agent can reach the same effect by another route. - State-changing retry identity: Trace how a runtime-issued commit identity handles repeated state-changing calls and why an unknown result requires verification before retry.
Why it matters: A timeout must not accidentally turn one intended operation into two effects.
Key terms: tool contract, effect, granted effects, protected_args, registry, candidate set, summaries, selector, admission, stable argument snapshot
6.3.4 When Tool Dispatch breaks
This section identifies four ways Tool Dispatch fails: unenforced tool catalogs, unchecked arguments, silent fallback to broader tools, and work that needs a persistent plan rather than a single route.
- Executable tool catalog boundary: Explain why telling the model to use only listed tools is insufficient: the runtime must enforce an executable allowlist that imported content cannot expand.
Why it matters: The agent must not gain a new capability just because untrusted content tells it one exists. - Argument admission at execution: Distinguish reducing the set of candidate tools from admitting a particular call, including its arguments. Describe why argument provenance and protected state must be checked at the execution boundary.
Why it matters: A correctly routed call can still cause the wrong effect if its inputs are not checked. - Explicit fallback authority checks: Explain why switching from a failed API call to a shell or browser can change the action boundary, and describe the checks and record needed for that fallback.
Why it matters: A failed call should not silently give the agent a broader way to act. - Dispatch versus persistent planning: Distinguish choosing the next capability with Tool Dispatch from managing work whose dependencies, partial completion, and recovery state must survive interruption.
Why it matters: Keeping routing separate from persistent planning makes the responsibility of each pattern clear.
Key terms: Tool Dispatch, catalog, executable allowlist, imported content, candidate reduction, admission, argument provenance, protected state, execution boundary, silent fallback
6.4 Pattern: Plan-and-Execute
The section introduces Plan-and-Execute as an action pattern for coordinating work that cannot safely restart from the beginning.
- Plan and executor roles: Explain how Plan-and-Execute separates a task-level plan from the executor that advances and records the work, and why a model-written checklist alone is insufficient.
Why it matters: The distinction is between writing a plan and reliably coordinating its execution. - Unsafe restart decision: Describe when Plan-and-Execute is useful and what information it persists to support progress and recovery.
Why it matters: Persisted progress lets the system recover without treating already completed work as if it never happened. - Bounds on local replanning: Explain the limits on changing a plan after a failure.
Why it matters: A failed step may need a new approach without invalidating what has already been accepted.
Key terms: Plan-and-Execute, task-level plan, executor, shared execution state, Action × Orchestrate, unqualified restart, partial completion, external effects, acceptance evidence, step status
6.4.1 The interruption test
This section uses an interruption test to show when an execution plan needs durable state and how recovery should handle uncertain effects.
- Interruption-Based Admission Test: Apply the interruption test to decide when Plan-and-Execute needs a durable execution record instead of relying on step count.
Why it matters: The risk of repeating an effect matters more than the length of the plan. - Durable State and Recovery: Explain what an execution record must distinguish and how those distinctions guide recovery after an uncertain external effect.
Why it matters: After an interruption, knowing which effects actually took hold prevents unsafe repetition and misplaced replanning.
Key terms: interruption test, durable execution record, execution plan, unknown outcome, accepted external effect, pending region
6.4.2 Make the plan an execution record
This section explains how a plan becomes a durable execution record by keeping references current, gating steps on accepted dependencies, and verifying completion.
- Durable plan references: Explain how a plan can serve as a recovery baseline without storing values that may become stale before execution.
Why it matters: A recoverable plan needs to identify its targets without relying on outdated observations. - Verified step completion: Describe when a step is eligible to run and what must happen before it can be marked DONE.
Why it matters: A returned call is not enough evidence that a step's intended result was achieved. - Concurrent step claims: Explain why a real workflow needs controlled state transitions when multiple workers execute a plan.
Why it matters: Without controlled transitions, concurrent workers could both take responsibility for one step.
Key terms: recovery baseline, stable object references, mutable values, DONE, acceptance contract, accepted dependencies, runtime-owned verifier, plan graph, compare-and-set, transactional event store
6.4.3 Persist before asking the model to remember
This section explains how a persistent checkpoint helps an execution plan survive process loss, and why recovery can still repeat an unfinished task.
- Local checkpoint persistence: Explain why an in-memory graph cannot recover after its process disappears and how the local JSON checkpoint is written safely.
Why it matters: A plan that exists only in process memory is lost when that process disappears. - Checkpoint recovery limits: Describe what a persistent checkpointer restores and why a resumed run can execute an unfinished task again.
Why it matters: Restoring progress is not the same as ensuring an external action happens only once.
Key terms: in-memory graph, JSON checkpoint, single writer, persistent checkpointer, checkpoint boundaries, replays forward, exactly-once side effects
6.4.4 Recover effects before retrying calls
This section explains how to recover a workflow step when an external action may have succeeded before its result was saved locally.
- External commit crash window: Explain how an external service can accept a job before the executor saves its receipt, leaving recovery unable to tell from local state whether the action succeeded.
Why it matters: A missing local receipt is not proof that the external action failed. - Effect verification before retry: Describe how recovery uses the same commit identity to check the external result, then records success, retries a confirmed rejection, or blocks an unresolved step for review.
Why it matters: Checking what happened prevents an uncertain step from being mistaken for a failed one. - Idempotency and compensating actions: Distinguish a request-token contract that recognizes repeat calls from a compensation that addresses an already completed effect; explain why neither makes an effect disappear or guarantees exactly-once delivery.
Why it matters: Repeat-call protection and recovery from completed effects solve different problems.
Key terms: external commit, job receipt, step state, VERIFYING, commit identity, DONE, retry path, human review, request tokens, idempotency
6.4.5 Keep replanning local
This section limits replanning after an execution failure to affected unfinished steps and separates local recovery from changes to the shared production workflow.
- Bounded Local Replanning: Explain when an execution failure permits a new route and which parts of the plan a local replan may replace.
Why it matters: These limits let an agent recover from failure without undoing accepted work or changing the task it was given. - Shared Workflow Change Boundary: Distinguish local recovery from a change to the shared production workflow.
Why it matters: Keeping workflow changes separate prevents a recovery attempt from quietly changing how future work is run.
Key terms: local replan, affected set, pending, failed, invariants, shared production workflow, versioned design and governance event, local recovery
6.4.6 When Plan-and-Execute breaks
This section explains when Plan-and-Execute fails and when its state machinery is not worth using.
- Durable execution state: Explain why a plan kept only in the prompt cannot support reliable recovery after a crash and why state must be persisted outside the model context.
Why it matters: A plausible reconstructed plan is not a reliable record of what already happened. - Evidence-based completion states: Distinguish a function returning from a task being DONE, using the section's examples of work that still lacks acceptance evidence.
Why it matters: Calling work DONE too early can hide an effect that has not been accepted. - Bounded recovery after failures: Describe how to recover from a local problem without restarting the whole plan.
Why it matters: Local recovery avoids turning a failure into a replay of work already accepted. - Justification for plan machinery: Explain when a plan may be unnecessary and what should justify its added state machinery.
Why it matters: Planning adds machinery that simple, repeatable work may not need.
Key terms: plan, external effects, model context, persist state, DONE, acceptance evidence, state, accepted work, uncertain effects, pending subgraph
6.5 Pattern: Guardrail Sandwich
This section introduces the Guardrail Sandwich as a higher-trust boundary around state-changing actions and identifies when and how to apply it.
- Three-stage guarded action: Explain how a trusted pre-check, controlled executor, and trusted post-check surround a state-changing action, and why the pattern is Action × Hierarchy despite running in sequence.
Why it matters: The agent's action should not get to authorize itself or declare its own effect complete. - Risk-based guarded execution: Describe when to use the Guardrail Sandwich and how to keep its controls outside the agent's control, including a guarded facade, request and argument snapshots, and protected business evidence.
Why it matters: These boundaries prevent a risky action from bypassing its checks or supplying its own proof of success.
Key terms: Guardrail Sandwich, pre-check, controlled executor, post-check, Action × Hierarchy, facade, agent's writable state, runner arguments, protected business evidence
6.5.1 Return to the payroll result
The section uses a duplicate payroll payment to show why guarded action needs checks before and after execution, with verification independent of the model.
- Durable Payment Admission: Explain why the runtime must give every attempt at an authorized payment one durable identity and check its recorded outcome before execution.
Why it matters: The admission check can prevent a duplicate that a check on each individual request would miss. - Post-Execution Effect Reconciliation: Describe what the runtime checks after execution and distinguish detecting a duplicate from undoing it.
Why it matters: A failed task status is not the same thing as reversing an external payment. - Independent Guardrail Trust: Explain the separation of admission, controlled execution, and effect verification, including why the model cannot set or certify its own guardrails.
Why it matters: The system should not let the component proposing an action define its own permission or declare its own success.
Key terms: durable identity, per-request idempotency, recorded outcome, provider receipts, reconciliation, compensation obligation, admission, controlled execution, effect verification, preconditions
6.5.2 Admission, containment, and verification
Distinguishes controls that admit or contain an action from checks that verify its intended effect, using code repair as an example.
- Admission and containment controls: Distinguish permission rules and hooks that decide whether a call may run from a sandbox that restricts a process after it starts. Explain why a synchronous hook can block an action but an asynchronous hook cannot block one that has already continued.
Why it matters: The timing and placement of a control determine what it can actually prevent. - Verification of action effects: Explain why an admitted, sandboxed, or successfully exited command does not establish the requested outcome. Describe how the code-repair flow independently reruns applicable verifiers before opening a pull request, and what that check still cannot prove.
Why it matters: A safe-looking execution trace is not evidence that the intended result happened.
Key terms: permission rules, PreToolUse hooks, sandbox, admission, synchronous hook, asynchronous hook, Guardrail Sandwich, verifiers, publication effect, functional correctness
6.5.3 Build a fail-closed guarded path
This section shows how a guarded executor fixes checks in the tool contract, records uncertain outcomes conservatively, and distinguishes its control path from a security sandbox.
- Registered guard contracts: Explain that required pre- and post-checks belong to the registered tool rather than being supplied by the agent on each call, and that guards return structured evidence.
Why it matters: Keeping required checks in the tool contract prevents a call from defining its own safeguards. - Conservative execution outcomes: Distinguish a failed pre-check, an unknown outcome, and a conclusive post-check mismatch. Explain why an ordinary runner exception cannot establish that no external effect started.
Why it matters: An exception or missing receipt must not be mistaken for proof that an external action did not happen. - Audit and runner boundaries: Describe what the executor snapshots for its audit record and distinguish those copies and a demonstrative Python call from a real runner's security boundary.
Why it matters: An auditable demonstration should not be mistaken for an isolated production execution environment.
Key terms: registered tool, guards, pre- and post-checks, structured evidence, typed runner failure, unknown, failed, compensation obligation, post-check, audit record
6.5.4 Verify the effect, not the story
The section shows how payroll guards verify a reserved commit against a trusted receipt of the actual effect, and where that verification stops.
- Commit and receipt checks: Explain how the payroll pre-check and post-check verify an attempted payment: the pre-check uses the reserved commit digest, and the post-check requires a settled receipt matching the commit, employee, amount, and payroll version.
Why it matters: A matching receipt connects the intended payment to evidence of what actually settled. - Protected and authoritative evidence: Describe why guard state is kept outside the agent's arguments and why the post-check must rely on authenticated, authoritative evidence rather than a status the action can set.
Why it matters: Otherwise, the agent could appear to pass verification without the external payment having occurred. - Commit identity limits: Explain why the described commit and receipt checks cannot by themselves detect a second payment made under a different commit identity.
Why it matters: A valid receipt for one commit does not rule out an additional payment made through another commit.
Key terms: pre-check, post-check, reserved commit digest, settled receipt, protected state, trusted provider adapter, authoritative systems, commit identity, authorization, reconciliation
6.5.5 When the Guardrail Sandwich breaks
This section explains how the Guardrail Sandwich fails when controls can be bypassed, containment or filtering is mistaken for verification, or a failed post-check is treated as a rollback.
- Nonbypassable action controls: Explain why action controls must be enforced at a runtime chokepoint and why effects must be classified from registered contracts rather than tool names alone.
Why it matters: A guardrail cannot constrain an action the agent can route around or mislabel. - Containment versus effect verification: Distinguish execution containment and output filtering from verification that the intended business effect occurred. Describe why the execution boundary needs a domain postcondition.
Why it matters: An action can stay within its allowed boundary and still produce the wrong result. - Failed post-check obligations: Explain why blocking a post-check cannot undo an action that has already run, and describe how to handle its result and unresolved effect.
Why it matters: Rejecting an output does not erase an effect that may already need repair or investigation.
Key terms: runtime chokepoint, registered contracts, hooks, containment, domain postcondition, output filtering, information-release checks, business-effect checks, blocked post-check, rollback
6.6 Composing action patterns
This section shows how to combine action patterns around the specific failure points of a cross-repository change, without treating them as a fixed stack.
- Pressure-Driven Pattern Composition: Explain why action patterns should be selected for the effects and failure points of a task rather than applied as a fixed stack.
Why it matters: It keeps the action design focused on the failure points that matter for the task. - Cross-Repository Pattern Roles: Trace how the four action patterns address different parts of the shared-schema change across the schema, client, and service repositories.
Why it matters: The example makes clear where each constraint belongs in a change with dependencies and publication effects. - Plan Nodes And Agents: Distinguish a plan node from an agent, and describe when the work instead raises a collaboration question.
Why it matters: A plan's steps should not be mistaken for an agent team; coordination between agents is a separate design concern.
Key terms: seams, pressure, effect, failure terrain, Plan-and-Execute, Prompt Chain, Tool Dispatch, Guardrail Sandwich, versioned dependency graph, plan nodes
6.7 Testing the Action boundary
This section shows how to test whether an agent completes intended actions while keeping failures and unintended effects bounded.
- Useful and bounded action: Explain why Action tests must check both legitimate completion and bounded failure, rather than treating safety or speed alone as success.
Why it matters: An action is successful only if it does the intended work without unacceptable side effects. - Effect-specific evidence bundles: Describe the evidence an Action test should gather for an external effect, and distinguish missing verification from a passing result.
Why it matters: Evidence tied to the actual effect helps distinguish a verified outcome from an agent's claim that it succeeded. - Boundary failure injections: Describe how to test an Action pattern's claimed boundary by injecting failures at that boundary.
Why it matters: A control's protection becomes credible when it holds under the failure it was designed to handle. - Evidence-based test thresholds: Explain how failure-test results should be connected to controls and how thresholds should be chosen.
Why it matters: Task-specific thresholds make the trade-off between rejecting useful actions and allowing harmful effects explicit.
Key terms: legitimate completion, bounded failure, Action test, evidence bundle, expected diff, verifier execution, verifier result, independent health probe, failure injections, boundary
6.8 Argus checkpoint: Action
This checkpoint shows how Argus routes executable calls through admission and guards, records what happened, and keeps the limits of that implementation explicit.
- Guarded tool dispatch path: Trace how Argus exposes eligible tools, admits a selected call against current context, and executes it through registered guards.
Why it matters: This path makes tool eligibility, admission, and execution separate, inspectable decisions. - Action attempt evidence: Describe what Argus retains about an attempted action and how that record separates intended work from an accepted effect.
Why it matters: The attempt record gives later inspection evidence about what occurred rather than just what the agent says it did. - Implementation boundary and orchestration: Distinguish what this Argus facade integrates from orchestration and execution isolation that it does not provide automatically.
Why it matters: These limits prevent a guarded call from being mistaken for automatic workflow management or execution isolation.
Key terms: policy-filtered tool catalog, registry, dispatch chokepoint, GuardedTool, Action attempt, Action trace, accepted effect, post-check evidence, Prompt Chaining, versioned plan records
6.9 Summary
6.10 References
This section lists sources and companion resources for the chapter’s action patterns without explaining new concepts.
Where this is used later
- Risk classification and the approval ladder (chapter 9) · The later approval ladder addresses how authority for risky actions is granted.
- Classifying action risk (chapter 9) · Effect-based questions inform the later classification of action risk.
- (chapter intro) (chapter 9) · Connects action risk to an action's effects.
- What is governance? Autonomy without accountability is a liability (chapter 9) · Relates action risk to its effects.
- Separate the work at its dependencies (chapter 11) · The role of seams between chained stages
- From observed failure to a candidate composition (chapter 10) · Tool Dispatch as an action pattern
- Reuse the mechanisms and supply the adapters (chapter 10) · Tool Dispatch provides an action-control mechanism to adapt
- What to observe: Metrics locate the problem; trajectories explain the path (chapter 9) · Earlier discussion of revealing a smaller set of tool capabilities for selection.
Concepts explained in this chapter
- admissionTool admission is a check that a proposed tool operation remains authorized and appropriate given current authority, provenance, and state freshness.
- dispatchingThe assignment of a request or unit of work to a processing path or handler based on its properties.
- commit identityAn identifier assigned by a runtime to recognize repeated requests for the same state-changing business operation.
- prompt chainA workflow pattern that divides a known sequence into narrow stages, with each stage producing an artifact that passes a gate before the next stage proceeds.
- guardrail sandwichAn execution pattern that places a state-changing action between trusted pre-check and post-check controls, with a controlled executor in between.
- plan-and-executeAn agent pattern in which planning precedes execution of the planned steps.
- verificationThe process of checking whether a system or result satisfies specified requirements or properties.
- tool registryA collection of tools available to an agent, together with information needed to identify or invoke them.
- tool contractA description of a tool's execution requirements, including checks and information needed by its runner.
- actionAn agent capability for executing external operations or producing artifacts in response to reasoning.
- progressive disclosureProgressive disclosure is a technique that reveals detailed information or capabilities only when they become relevant to the current task.
- recoveryThe process of restoring a system or its operation after a failure or interruption.
- checkpointingThe practice of recording execution state at checkpoints so a workflow can resume after interruption.
- evidenceInformation that supports or substantiates a claim or decision.
- agent skillA packaged agent capability that specifies how to perform a class of tasks, including relevant tools and workflow guidance.
- verifierA verifier is a component that checks whether an answer or result satisfies relevant criteria.
- validationValidation is the process of assessing whether a candidate lesson is suitable to influence a later task.
- trustThe confidence an organization grants an agent to act within defined limits, informed by its observed outcomes.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.
