An agentic system uses Claude as an orchestrator directing 4 subagents to complete a complex software deployment task. The orchestrator issues tool calls to: code_analyzer, security_scanner, test_runner, and deploy_executor. During a deployment, the orchestrator calls deploy_executor after test_runner returns success. Midway through deployment, the orchestrator loses its context window (OOM error in the hosting environment). The deployment is now in an indeterminate state — partially complete. What architectural feature should have been implemented to handle this failure mode? Change policy requires that any interrupted production deployment be returned to the last known-good release rather than resumed.
Select an answer to reveal the explanation.
Short Explanation
It's like an undo button you set up before every step. A saga registers a rollback for each deploy action, so when the orchestrator dies halfway, a recovery process walks those rollbacks backward and you're back on the last good release, just like the policy demands.
Full Explanation
The saga pattern with compensating transactions is the feature that satisfies the stated change policy. Each deployment step registers both its forward action and a matching rollback. If the orchestrator fails, an independent recovery process runs the registered rollbacks in reverse order, returning the environment to the last known-good release no matter how far the deployment progressed. Checkpoint-and-resume is a legitimate recovery technique, and Anthropic describes resuming agents from where errors occurred, but its purpose is to continue the interrupted work. The policy here forbids resuming an interrupted production deployment, so a design built to pick up where it left off fails the requirement even if it works technically. Idempotent tools with full replay also move forward rather than back, and many deployment operations, such as migrations and restarts, are not naturally idempotent without substantial redesign. Heartbeat monitoring shortens detection time but does nothing about the half-applied changes already in production. On the exam, read the recovery goal carefully: resume, replay, and rollback solve different problems. Operationally, test every compensating action in staging and alert when a rollback step itself fails.