Measuring Recovery Behavior: How Agents Handle Errors Mid-Task

Measuring Recovery Behavior: How Agents Handle Errors Mid-Task

An agent that never makes errors is not a useful agent. It is an agent operating on tasks that are too easy. The meaningful question for post-training and evaluation is not whether an agent errs, but what it does next. Measuring recovery behavior mid-task is one of the least standardized problems in agentic evaluation today, and the gap between how labs measure it and how it actually matters in deployment is significant. This post gives you a concrete framework for designing recovery-behavior evals, specifying verifiers, and interpreting results.

What Is Recovery Behavior and Why Does It Require Its Own Measurement?

Recovery behavior is the set of actions an agent takes after encountering a detectable error state during task execution, before the episode terminates. It is distinct from error avoidance and from final-outcome accuracy. An agent can fail to recover and still produce a correct final output by luck or by restarting from scratch. An agent can appear to recover while actually masking the error in a way that propagates downstream.

Standard pass@k evaluation, which estimates the probability that at least one of k independent samples solves a task correctly, collapses the recovery signal entirely. It treats each sample as an independent trajectory. It tells you nothing about whether the agent detected the error, whether it diagnosed it correctly, or whether its recovery action was appropriate to the error class. For agents operating in multi-step environments, those three distinctions are operationally critical.

Recovery behavior also drifts as models improve. An error class that required a three-step recovery sequence in one model generation may become a single-step correction in the next, or may disappear as a failure mode altogether. Calibration against current frontier models is not optional; it must be repeated as models update. See the discussion of judge reliability drift across model updates for the parallel problem in automated scoring.

Answer Capsule

Measuring recovery behavior requires decomposing agent trajectories into three sub-signals: error detection rate (did the agent recognize the fault?), diagnosis accuracy (did it identify the correct error class?), and recovery action quality (did it choose an appropriate corrective action?). Each sub-signal needs its own verifier or rubric. Aggregate task-success metrics mask all three.

How to Decompose a Recovery Trajectory Into Measurable Sub-Signals

Recovery is not a single event. It is a sequence with at least three identifiable phases, each of which can succeed or fail independently.

  1. Error detection. The agent receives an observation that signals a fault. Detection is measurable: did the agent's next action or internal state change in response to the error signal, or did it continue as if nothing happened? A verifier can check this by comparing the agent's action at step t+1 against a null-continuation baseline.

  2. Diagnosis. The agent classifies the error. Diagnosis accuracy is measurable if tasks are authored with a ground-truth error taxonomy. An agent that detects a unit mismatch but diagnoses it as a data-retrieval failure will apply the wrong recovery action. The error propagates.

  3. Recovery action. The agent executes a corrective step. Recovery action quality is measurable against a verifier that checks whether the post-recovery state satisfies the preconditions required to continue the task correctly. A recovery that restores a superficially valid state but violates a downstream constraint is a masked failure.

Designing tasks that inject errors at controlled points in the trajectory, with known error classes and known ground-truth recovery actions, is the only way to measure all three phases independently. This is the core authoring challenge. For the related problem of classifying what went wrong in expert-authored data, the defect taxonomies for expert data framework provides a useful starting structure.

Designing Tasks That Isolate Recovery Behavior

Generic multi-step tasks do not isolate recovery. If an agent can complete a task by ignoring an injected error, the task does not measure recovery at all. Task design must enforce that the error is on the critical path.

Four design constraints make a task a valid recovery-behavior eval:

  • Error on the critical path. The injected fault must block task completion unless corrected. A fault the agent can route around does not test recovery; it tests planning flexibility, which is a different construct.

  • Single error injection per task. Injecting multiple simultaneous errors conflates error interaction effects with recovery capability. Use one error per task instance. Vary the error class across the task set.

  • Observable error signal. The agent must receive a signal that the error occurred, whether through a tool return, an environment state change, or an explicit exception. Silent failures require a separate eval design focused on anomaly detection, not recovery.

  • State checkpointing. The environment must support returning to the pre-error state so that the agent's recovery action can be evaluated against the correct baseline, not against a corrupted state.

For RL environment design considerations that support these constraints, the post on RL environment design for LLM agents covers state, action, and reward architecture in detail.

Verifier Design for Recovery Sub-Signals

Each sub-signal requires a different verifier type. Using a single end-state verifier for all three is the most common design error in recovery evals.

Sub-signal

Verifier type

What it checks

Failure if...

Error detection

Trajectory parser

Action change after error signal

Agent continues null trajectory post-fault

Diagnosis accuracy

Classification verifier

Agent's stated or implied error class vs. ground truth

Agent applies recovery action inconsistent with actual error

Recovery action quality

State precondition checker

Post-recovery state satisfies task continuation preconditions

State is superficially valid but violates downstream constraint

Programmatic verifiers are preferable for detection and state checking. Diagnosis accuracy often requires expert rubric scoring when the agent's reasoning is implicit rather than explicit. Rubric design for open-ended technical responses is a non-trivial problem; the post on measuring annotation quality in open-ended technical responses addresses the inter-annotator agreement challenges that arise here.

Worked Example: Recovery Eval in a Manufacturing Process Task

Illustrative example. Numbers and task details are constructed for clarity; they do not represent results from any specific model or deployment.

Task: An agent is given a multi-step CNC machining process plan. At step 4 of 8, a tool-change command references a tool that is not in the active tool library. This is the injected fault. The error signal is an explicit tool-not-found return from the simulated machine controller. The correct recovery sequence is: (1) detect the tool-not-found signal, (2) diagnose it as a tool-library reference error rather than a spindle fault or a feed-rate error, (3) substitute the correct tool number from the available library and re-issue the command.

Across a set of 60 task instances with this error class, a hypothetical evaluation might find:

  • Detection rate: 85% of agents change their action in response to the error signal. 15% continue to step 5 without acknowledgment.

  • Diagnosis accuracy: Of agents that detect the error, 60% correctly identify it as a tool-library reference error. 25% misclassify it as a spindle fault and apply an inappropriate recovery action. 15% produce a generic retry without diagnosis.

  • Recovery action quality: Of agents that correctly diagnose, 70% select a valid tool substitute and produce a post-recovery state that passes the precondition check for step 5.

The compound recovery success rate is 0.85 x 0.60 x 0.70 = 0.357, or approximately 36%. An end-state-only eval that scores only whether the agent eventually completes the 8-step plan would obscure whether that 36% figure reflects genuine recovery or trajectory restart. These are not equivalent capabilities for deployment.

For the specific failure modes that arise in G-code and CNC task evaluation, the post on safety-critical G-code errors in evals covers the crash-prone output classes that make recovery evaluation particularly high-stakes in this domain.

Common Failure Modes in Recovery Behavior Measurement

1. Measuring end-state success only. Detection: recovery behavior is not reported separately from task completion rate. Fix: decompose trajectories into the three sub-signals before scoring. Add trajectory-level logging that captures the agent's action immediately following the error signal.

2. Injecting errors that are not on the critical path. Detection: agents achieve high task-completion rates despite low detection rates. Fix: verify that removing the recovery action from a correct trajectory causes task failure. If it does not, the error is not on the critical path.

3. Using a single error class across all tasks. Detection: recovery rates are high but do not generalize to held-out error classes in deployment. Fix: author tasks across a taxonomy of error classes. Recovery capability is error-class-specific, not a general agent property.

4. Conflating recovery with retry. Detection: agents that simply restart the task from step 1 score as successful recoverers. Fix: the verifier must distinguish in-trajectory correction from full restart. A restart is a valid strategy in some environments but is not recovery behavior.

5. Expert rubric misalignment with the error taxonomy. Detection: inter-annotator agreement on diagnosis accuracy is low. Fix: run a rubric coverage audit before scoring at scale. The post on rubric coverage audits describes how to identify and close coverage gaps before they contaminate your scoring data.

6. Score drift as models improve. Detection: recovery rates on a fixed task set increase monotonically across model updates without task refresh. Fix: re-calibrate task difficulty against current frontier models on a scheduled basis. Tasks where frontier models achieve near-ceiling recovery rates no longer measure the capability of interest.

Where This Approach Breaks Down

This framework assumes errors are detectable by the agent through an observable signal. Silent failures, where the environment does not return an error signal and the fault is only detectable through downstream state inspection, require a different eval design centered on anomaly detection and proactive state validation. Recovery behavior measurement, as described here, does not apply to that failure class.

The framework also assumes that ground-truth recovery actions can be specified by domain experts. In open-ended planning tasks where multiple valid recovery paths exist, diagnosis accuracy becomes harder to score without expert rubrics, and inter-annotator agreement tends to drop. Task authoring cost increases substantially in those domains.

Finally, compound recovery rates (the product of three sub-signal rates) produce small numbers quickly. A task set needs sufficient instances per error class to estimate each sub-signal with reasonable confidence. Fewer than 30 instances per error class produces wide confidence intervals on the compound metric.

Frequently Asked Questions

What is the difference between recovery behavior and robustness in agent evaluation?

Robustness typically refers to performance stability under input distribution shift or noisy observations. Recovery behavior is specifically the agent's response to a detected error state during task execution. Robustness is measured across task distributions; recovery behavior is measured within a single task trajectory at the point of fault. The two constructs require different eval designs and different verifiers.

Can a language model judge score recovery behavior reliably?

An LLM judge can score diagnosis accuracy and recovery action quality if the rubric is precise and the error taxonomy is explicit. Detection rate is better measured programmatically from trajectory logs. Judge reliability on open-ended recovery reasoning degrades when the error class is domain-specific and the judge lacks domain grounding. Human expert review is the fallback for high-stakes domains.

How many task instances are needed per error class?

To estimate a sub-signal rate with a 95% confidence interval of plus or minus 10 percentage points, you need approximately 96 instances per error class, assuming a binomial distribution and a rate near 50%. If the rate is near 80% or 20%, the required sample size drops. For compound metrics, each sub-signal rate needs its own sample; you cannot reuse instances across sub-signals if they are evaluated sequentially.

Should recovery behavior be a reward signal in RL training?

Recovery behavior can be a shaped reward signal if the three sub-signals are verifiable programmatically. Rewarding detection and correct diagnosis separately from final task success encourages the agent to develop explicit error-handling behavior rather than learning to mask or route around faults. Process reward models trained on recovery trajectories are one approach, but they require expert-authored demonstration data for the recovery phase specifically, not just for the nominal task path.

How does task planning evaluation relate to recovery behavior?

Task planning evals typically measure whether an agent selects a valid action sequence to reach a goal state from a clean initial state. Recovery behavior evals measure whether an agent can re-plan or correct from a degraded state mid-execution. The two are related but not equivalent. An agent with strong planning capability may still fail at recovery if it cannot detect that its current state is degraded. The post on task planning evals for embodied agents covers the planning side of this distinction.

What This Means in Practice

Recovery behavior is not a property of an agent in the abstract. It is a property of an agent relative to a specific error class, in a specific environment, at a specific point in model development. Aggregate task-success metrics will not surface it. Trajectory decomposition, error-class taxonomies, and sub-signal verifiers are the minimum infrastructure required to measure it usefully. The authoring cost is real. So is the signal value: an agent that recovers reliably from mid-task faults is a categorically different deployment artifact than one that does not, even if their end-state accuracy scores are identical.

If you are building evals or RL environments that require expert-authored recovery tasks in engineering, manufacturing, or other specialist domains, get in touch with Chiron Datalabs.

Have questions or want personalised guidance? Contact us and we'll be happy to help.

An agent that never makes errors is not a useful agent. It is an agent operating on tasks that are too easy. The meaningful question for post-training and evaluation is not whether an agent errs, but what it does next. Measuring recovery behavior mid-task is one of the least standardized problems in agentic evaluation today, and the gap between how labs measure it and how it actually matters in deployment is significant. This post gives you a concrete framework for designing recovery-behavior evals, specifying verifiers, and interpreting results.

What Is Recovery Behavior and Why Does It Require Its Own Measurement?

Recovery behavior is the set of actions an agent takes after encountering a detectable error state during task execution, before the episode terminates. It is distinct from error avoidance and from final-outcome accuracy. An agent can fail to recover and still produce a correct final output by luck or by restarting from scratch. An agent can appear to recover while actually masking the error in a way that propagates downstream.

Standard pass@k evaluation, which estimates the probability that at least one of k independent samples solves a task correctly, collapses the recovery signal entirely. It treats each sample as an independent trajectory. It tells you nothing about whether the agent detected the error, whether it diagnosed it correctly, or whether its recovery action was appropriate to the error class. For agents operating in multi-step environments, those three distinctions are operationally critical.

Recovery behavior also drifts as models improve. An error class that required a three-step recovery sequence in one model generation may become a single-step correction in the next, or may disappear as a failure mode altogether. Calibration against current frontier models is not optional; it must be repeated as models update. See the discussion of judge reliability drift across model updates for the parallel problem in automated scoring.

Answer Capsule

Measuring recovery behavior requires decomposing agent trajectories into three sub-signals: error detection rate (did the agent recognize the fault?), diagnosis accuracy (did it identify the correct error class?), and recovery action quality (did it choose an appropriate corrective action?). Each sub-signal needs its own verifier or rubric. Aggregate task-success metrics mask all three.

How to Decompose a Recovery Trajectory Into Measurable Sub-Signals

Recovery is not a single event. It is a sequence with at least three identifiable phases, each of which can succeed or fail independently.

  1. Error detection. The agent receives an observation that signals a fault. Detection is measurable: did the agent's next action or internal state change in response to the error signal, or did it continue as if nothing happened? A verifier can check this by comparing the agent's action at step t+1 against a null-continuation baseline.

  2. Diagnosis. The agent classifies the error. Diagnosis accuracy is measurable if tasks are authored with a ground-truth error taxonomy. An agent that detects a unit mismatch but diagnoses it as a data-retrieval failure will apply the wrong recovery action. The error propagates.

  3. Recovery action. The agent executes a corrective step. Recovery action quality is measurable against a verifier that checks whether the post-recovery state satisfies the preconditions required to continue the task correctly. A recovery that restores a superficially valid state but violates a downstream constraint is a masked failure.

Designing tasks that inject errors at controlled points in the trajectory, with known error classes and known ground-truth recovery actions, is the only way to measure all three phases independently. This is the core authoring challenge. For the related problem of classifying what went wrong in expert-authored data, the defect taxonomies for expert data framework provides a useful starting structure.

Designing Tasks That Isolate Recovery Behavior

Generic multi-step tasks do not isolate recovery. If an agent can complete a task by ignoring an injected error, the task does not measure recovery at all. Task design must enforce that the error is on the critical path.

Four design constraints make a task a valid recovery-behavior eval:

  • Error on the critical path. The injected fault must block task completion unless corrected. A fault the agent can route around does not test recovery; it tests planning flexibility, which is a different construct.

  • Single error injection per task. Injecting multiple simultaneous errors conflates error interaction effects with recovery capability. Use one error per task instance. Vary the error class across the task set.

  • Observable error signal. The agent must receive a signal that the error occurred, whether through a tool return, an environment state change, or an explicit exception. Silent failures require a separate eval design focused on anomaly detection, not recovery.

  • State checkpointing. The environment must support returning to the pre-error state so that the agent's recovery action can be evaluated against the correct baseline, not against a corrupted state.

For RL environment design considerations that support these constraints, the post on RL environment design for LLM agents covers state, action, and reward architecture in detail.

Verifier Design for Recovery Sub-Signals

Each sub-signal requires a different verifier type. Using a single end-state verifier for all three is the most common design error in recovery evals.

Sub-signal

Verifier type

What it checks

Failure if...

Error detection

Trajectory parser

Action change after error signal

Agent continues null trajectory post-fault

Diagnosis accuracy

Classification verifier

Agent's stated or implied error class vs. ground truth

Agent applies recovery action inconsistent with actual error

Recovery action quality

State precondition checker

Post-recovery state satisfies task continuation preconditions

State is superficially valid but violates downstream constraint

Programmatic verifiers are preferable for detection and state checking. Diagnosis accuracy often requires expert rubric scoring when the agent's reasoning is implicit rather than explicit. Rubric design for open-ended technical responses is a non-trivial problem; the post on measuring annotation quality in open-ended technical responses addresses the inter-annotator agreement challenges that arise here.

Worked Example: Recovery Eval in a Manufacturing Process Task

Illustrative example. Numbers and task details are constructed for clarity; they do not represent results from any specific model or deployment.

Task: An agent is given a multi-step CNC machining process plan. At step 4 of 8, a tool-change command references a tool that is not in the active tool library. This is the injected fault. The error signal is an explicit tool-not-found return from the simulated machine controller. The correct recovery sequence is: (1) detect the tool-not-found signal, (2) diagnose it as a tool-library reference error rather than a spindle fault or a feed-rate error, (3) substitute the correct tool number from the available library and re-issue the command.

Across a set of 60 task instances with this error class, a hypothetical evaluation might find:

  • Detection rate: 85% of agents change their action in response to the error signal. 15% continue to step 5 without acknowledgment.

  • Diagnosis accuracy: Of agents that detect the error, 60% correctly identify it as a tool-library reference error. 25% misclassify it as a spindle fault and apply an inappropriate recovery action. 15% produce a generic retry without diagnosis.

  • Recovery action quality: Of agents that correctly diagnose, 70% select a valid tool substitute and produce a post-recovery state that passes the precondition check for step 5.

The compound recovery success rate is 0.85 x 0.60 x 0.70 = 0.357, or approximately 36%. An end-state-only eval that scores only whether the agent eventually completes the 8-step plan would obscure whether that 36% figure reflects genuine recovery or trajectory restart. These are not equivalent capabilities for deployment.

For the specific failure modes that arise in G-code and CNC task evaluation, the post on safety-critical G-code errors in evals covers the crash-prone output classes that make recovery evaluation particularly high-stakes in this domain.

Common Failure Modes in Recovery Behavior Measurement

1. Measuring end-state success only. Detection: recovery behavior is not reported separately from task completion rate. Fix: decompose trajectories into the three sub-signals before scoring. Add trajectory-level logging that captures the agent's action immediately following the error signal.

2. Injecting errors that are not on the critical path. Detection: agents achieve high task-completion rates despite low detection rates. Fix: verify that removing the recovery action from a correct trajectory causes task failure. If it does not, the error is not on the critical path.

3. Using a single error class across all tasks. Detection: recovery rates are high but do not generalize to held-out error classes in deployment. Fix: author tasks across a taxonomy of error classes. Recovery capability is error-class-specific, not a general agent property.

4. Conflating recovery with retry. Detection: agents that simply restart the task from step 1 score as successful recoverers. Fix: the verifier must distinguish in-trajectory correction from full restart. A restart is a valid strategy in some environments but is not recovery behavior.

5. Expert rubric misalignment with the error taxonomy. Detection: inter-annotator agreement on diagnosis accuracy is low. Fix: run a rubric coverage audit before scoring at scale. The post on rubric coverage audits describes how to identify and close coverage gaps before they contaminate your scoring data.

6. Score drift as models improve. Detection: recovery rates on a fixed task set increase monotonically across model updates without task refresh. Fix: re-calibrate task difficulty against current frontier models on a scheduled basis. Tasks where frontier models achieve near-ceiling recovery rates no longer measure the capability of interest.

Where This Approach Breaks Down

This framework assumes errors are detectable by the agent through an observable signal. Silent failures, where the environment does not return an error signal and the fault is only detectable through downstream state inspection, require a different eval design centered on anomaly detection and proactive state validation. Recovery behavior measurement, as described here, does not apply to that failure class.

The framework also assumes that ground-truth recovery actions can be specified by domain experts. In open-ended planning tasks where multiple valid recovery paths exist, diagnosis accuracy becomes harder to score without expert rubrics, and inter-annotator agreement tends to drop. Task authoring cost increases substantially in those domains.

Finally, compound recovery rates (the product of three sub-signal rates) produce small numbers quickly. A task set needs sufficient instances per error class to estimate each sub-signal with reasonable confidence. Fewer than 30 instances per error class produces wide confidence intervals on the compound metric.

Frequently Asked Questions

What is the difference between recovery behavior and robustness in agent evaluation?

Robustness typically refers to performance stability under input distribution shift or noisy observations. Recovery behavior is specifically the agent's response to a detected error state during task execution. Robustness is measured across task distributions; recovery behavior is measured within a single task trajectory at the point of fault. The two constructs require different eval designs and different verifiers.

Can a language model judge score recovery behavior reliably?

An LLM judge can score diagnosis accuracy and recovery action quality if the rubric is precise and the error taxonomy is explicit. Detection rate is better measured programmatically from trajectory logs. Judge reliability on open-ended recovery reasoning degrades when the error class is domain-specific and the judge lacks domain grounding. Human expert review is the fallback for high-stakes domains.

How many task instances are needed per error class?

To estimate a sub-signal rate with a 95% confidence interval of plus or minus 10 percentage points, you need approximately 96 instances per error class, assuming a binomial distribution and a rate near 50%. If the rate is near 80% or 20%, the required sample size drops. For compound metrics, each sub-signal rate needs its own sample; you cannot reuse instances across sub-signals if they are evaluated sequentially.

Should recovery behavior be a reward signal in RL training?

Recovery behavior can be a shaped reward signal if the three sub-signals are verifiable programmatically. Rewarding detection and correct diagnosis separately from final task success encourages the agent to develop explicit error-handling behavior rather than learning to mask or route around faults. Process reward models trained on recovery trajectories are one approach, but they require expert-authored demonstration data for the recovery phase specifically, not just for the nominal task path.

How does task planning evaluation relate to recovery behavior?

Task planning evals typically measure whether an agent selects a valid action sequence to reach a goal state from a clean initial state. Recovery behavior evals measure whether an agent can re-plan or correct from a degraded state mid-execution. The two are related but not equivalent. An agent with strong planning capability may still fail at recovery if it cannot detect that its current state is degraded. The post on task planning evals for embodied agents covers the planning side of this distinction.

What This Means in Practice

Recovery behavior is not a property of an agent in the abstract. It is a property of an agent relative to a specific error class, in a specific environment, at a specific point in model development. Aggregate task-success metrics will not surface it. Trajectory decomposition, error-class taxonomies, and sub-signal verifiers are the minimum infrastructure required to measure it usefully. The authoring cost is real. So is the signal value: an agent that recovers reliably from mid-task faults is a categorically different deployment artifact than one that does not, even if their end-state accuracy scores are identical.

If you are building evals or RL environments that require expert-authored recovery tasks in engineering, manufacturing, or other specialist domains, get in touch with Chiron Datalabs.

Have questions or want personalised guidance? Contact us and we'll be happy to help.

© 2026 CHIRON, SAN FRANCISCO, CA