NVIDIANVIDIA-Certified Professional: Agentic AI2026-1010.4 Enable human oversight and intervention for accountability and trust.
Stop agent runs and reconcile their effects
Completed by the knowledge check
Learning objective
Implement interrupts, overrides, and safe cancellation.
Core idea
An interrupt preserves a decision point, an override changes an authorized decision, and cancellation requests that execution stop. None automatically reverses an external write. Safe intervention requires knowing which actions have not started, which are in flight, and which have completed.
See 10.1.1 for the controls a person uses and 10.1.2 for synchronous versus asynchronous review. This lesson focuses on the executor: what happens when a stop request races with a tool call, how resume can repeat work, and when you need compensation instead of another execution attempt.
Treat “stop requested” and “effects reconciled” as separate application outcomes. The first confirms that the system received an intervention; the second confirms what actually happened to the business operation.
How it works
Interrupt before the next consequence
A NeMo Agent Toolkit function pauses the workflow when it awaits UserInteractionManager.prompt_user_input(...); over HTTP, the execution then reports interaction_required. Place that interaction before the next action that needs review. A prompt after sending a message can influence subsequent work, but cannot prevent the message already sent.
For a Python LangGraph implementation, interrupt() saves graph state through a checkpointer and waits for external input. Resume uses Command(resume=...) with the same configurable.thread_id. The interrupted node restarts from its beginning on resume; code before the interrupt executes again. Keep side effects after the interrupt, isolate them into separate nodes where possible, and make repeatable effects idempotent as the documentation recommends.
An interrupt is therefore a controlled suspension point, not an arbitrary freeze of every external service. If another branch has already submitted an operation, the intervention must account for that branch independently. The workflow’s durable state and the downstream system’s state can differ after a timeout or lost response.
Apply overrides to a specific pending operation
In NeMo Agent Toolkit, HumanPromptBinary presents a binary_choice prompt; the HTTP interface documents a Continue/Cancel pair and a selected_option response. Your tool interprets that choice to permit or deny the pending operation before execution. See 10.1.1 for the control itself. Choosing Cancel at this decision point denies the pending action; it does not undo an action already submitted.
LangChain’s HumanInTheLoopMiddleware distinguishes approve, edit, and reject. An edit changes tool arguments before execution; reject skips that tool call and supplies rejection feedback. These are useful override mechanisms when the operation is still pending.
The same documentation distinguishes respond, which acts as a successful tool result for an ask-user interaction. Do not use respond to express denial of a side-effecting action. Use the rejection path so the agent receives the correct execution outcome.
Revalidate edited arguments against the action policy from 10.4.1. Changing a recipient, resource, or scope can require a different reviewer. The LangChain documentation also warns that substantial edits can cause the model to reconsider its approach and potentially execute tools multiple times. An override must remain subject to downstream permissions and duplicate-effect protection.
Cancel local work cooperatively
The toolkit’s HTTP Interactive Execution reference lists running, interaction_required, oauth_required, completed, and failed as all possible execution statuses. It defines no canceled state in that interface. Keep the stop request and its reconciled outcome in your hosting application’s state rather than assuming a toolkit execution status proves cancellation.
For Python asynchronous execution, asyncio.Task.cancel() requests cancellation. It arranges for CancelledError to be raised in the coroutine at the next opportunity; it does not guarantee that the coroutine is canceled. Use try/finally for cleanup, and generally propagate CancelledError after cleanup if you catch it.
The service owner should connect the application stop request to the relevant task, stop admitting subsequent effectful operations, and wait for task termination before reporting that local execution ended. Do not label a closed browser tab or a disconnected response stream as proof that the worker terminated.
Stopping your coroutine does not by itself cancel a request a remote system already received. That remote system might finish the submitted operation. Record the submitted operation identifier and query the downstream result through that system’s supported interface. When the outcome remains unknown, preserve that state for reconciliation rather than reporting that nothing happened.
A stop request ends local execution only after task termination, while a request a remote system already received still needs its downstream result queried.
Compensate completed effects
Microsoft’s Compensating Transaction pattern records completed steps and the information needed to undo their business effects. Compensation is application-specific, can fail, and need not restore the original state or run in the exact reverse order. Its steps should be idempotent so a failed compensation can resume safely.
Define a compensation record for each reversible effect: the original operation identifier, observed outcome, corrective action, and recovery status. An operator may need to resolve a nonrefundable or irreversible effect manually. Distinguish that unresolved business consequence from the local worker’s successful cancellation.
Key distinctions and trade-offs
Select the intervention from the execution phase:
| Intervention | Appropriate phase | Mechanism | Remaining cost or risk |
|---|---|---|---|
| Interrupt | Before a decision-dependent effect | Toolkit prompt_user_input(...) or LangGraph interrupt() | Waiting state and resume management |
| Override | Pending operation with reviewable arguments | Toolkit HumanPromptBinary; LangChain edit or reject | Revalidation and changed agent behavior |
| Local cancellation | Running asynchronous work | Python Task.cancel() and cleanup | Cooperative response; remote work can continue |
| Compensation | Effect already completed | Recorded, idempotent corrective commands | Extra operations and incomplete business recovery |
Do not put an external write before a replayable interrupt and assume a checkpoint prevents duplicates. Persistence records workflow progress; replay behavior still determines which code runs again. Likewise, an override for future steps cannot rewrite a completed transfer into a different destination.
Architecture / decision scenario
A conference organizer’s meeting assistant sends follow-up invitations to 600 attendees in batches. The operator notices an incorrect venue after 120 invitations have completed; 10 more are in flight and 470 have not started. The business requires the send pipeline to acknowledge stop requests within two seconds and a human to review corrections within ten minutes.
One proposal closes the streaming connection and tells the operator that the run was canceled. Another rewinds the workflow checkpoint and resends the full list with corrected text. The first lacks proof that the worker stopped; the second can duplicate invitations already delivered.
The application owner chooses a separate stop transition. It closes admission to the 470 unstarted invitations, requests local task cancellation, and reconciles the 10 submitted operations using their downstream identifiers. The operator receives the actual completed, prevented, and unresolved counts. The owner measures acknowledgment latency separately from reconciliation time.
For completed invitations, the event manager approves a correction campaign as a compensating business action. A pending invitation can instead receive an edit before execution, subject to the same authorization checks. If the review workflow uses LangGraph, its resume path keeps sends out of code that replays before interrupt().
A cancellation test injects the stop request before submission, during a lost response, and after completion. Success means each phase produces an accurate business outcome and a bounded recovery path, rather than one reassuring status for all three.
Common exam traps
- Treating cancellation acknowledgment as proof that remote effects stopped.
- Assuming code before a LangGraph interrupt runs only once.
- Using
respondas denial of a side-effecting tool call. - Swallowing
CancelledErrorand continuing the workflow. - Treating compensation as an atomic rollback with no further failure modes.
Where the exam guide differs
The study guide’s suggested readings use “NVIDIA Agent Intelligence Toolkit.” The product documentation calls it NeMo Agent Toolkit. The guide’s objective says “intervention.” For an exam item using that term, choose an interrupt, override, or cancellation from the execution phase, and account separately for effects already completed.
What to remember
Interrupt pending decisions, validate overrides, and cancel running work through its execution mechanism. Reconcile submitted effects before declaring the business operation stopped. Completed effects need compensation or an explicit unresolved outcome, even after the local task terminates.
Knowledge check
An agent emails a price change to 1,000 customers in batches. An operator finds an error after 300 emails have completed; 20 are in flight and 680 have not started. The business needs an accurate account of what happened to every email. Which stop procedure meets that need?
A LangGraph node calls a contract service’s send_contract, then calls interrupt() so that a manager can review the next step. After every resume, the contract is sent a second time. The contract service offers no idempotency key. Which change prevents the duplicates?
configurable.thread_id after each reviewinterrupt() runs again. With no idempotency available, the send has to leave the replayed code, in a node after the interrupt. A checkpointer records workflow progress but does not change which code replays, and resuming requires the same thread_id .An agent built with LangChain’s HumanInTheLoopMiddleware pauses before transfer_funds. The reviewer denies the transfer, and the agent must learn that the transfer did not happen. Which decision should the reviewer interface send?
respond , returning the reviewer’s message as the tool’s resultedit , setting the transfer amount to zero before executionapprove , followed by a compensating transfer after executionreject , skipping the call and returning rejection feedbackreject skips the tool call and gives the agent rejection feedback, so it receives the correct execution outcome. respond is treated as a successful tool result and is meant for ask-user tools, not for denying a side-effecting one. An edit still executes the tool, and approving then compensating creates an effect that the denial was meant to prevent.An asyncio worker processes a queue of refund requests. When an operator stops the run, the service calls Task.cancel() on the worker. The service must not report that local execution ended until it has. How should the worker and service handle the stop?
finally , let CancelledError propagate, and await the task’s endCancelledError , log it, and continue with the next queued requestTask.cancel() returnsTask.cancel() arranges for CancelledError to be raised at the next opportunity; it does not guarantee that the coroutine stops. Python recommends try/finally for cleanup and propagating CancelledError after it, and the service waits for the task to terminate before reporting it. Swallowing the error keeps the worker running, and a disconnected stream is not proof the worker ended.A compensating campaign sends correction emails for 300 completed price-change emails. It fails after 140 corrections because the mail service becomes unavailable. Which design lets the compensation finish safely?
References
- NVIDIA, HTTP Interactive Execution
- NVIDIA, Interactive Workflows Guide
- NVIDIA, Interactive data models
- LangChain, Interrupts
- LangChain, Human-in-the-loop
- Python Software Foundation, Coroutines and Tasks
- Microsoft, Compensating Transaction pattern
- NVIDIA, NVIDIA-Certified Professional: Agentic AI Exam Study Guide