Manuscript Offprint
arXiv:2610.36471When to Intervene? An Empirical Study of Errors and Self-Recovery in LLM Agents
Chiming Duan
Peking University
Beijing, China
Minghua He
Peking University
Beijing, China
Tong Jia
Peking University
Beijing, China
Lingzhe Zhang
Peking University
Beijing, China
Yingxi Chen
Beijing University of Posts and
Telecommunications
Beijing, China
Ying Li
Peking University
Beijing, China
Abstract
LLM agents interact with Web services to perform tasks on users' behalf. Errors during these interactions can disrupt execution and prevent task completion, motivating external intervention. However, agents may self-recover through continued execution, raising the question of when to intervene and when to wait for self-recovery. We present an empirical study of errors and self-recovery in LLM agents. We construct ReInBench, a dataset containing 1,259 agent traces and 1,403 error events across computer-use and Web tasks. Our study examines how often and how quickly agents self-recover, how self-recovery relates to subsequent execution and task completion, and whether self-recovery can be predicted when an error occurs. We find that 725 error events self-recover, often within a few steps, with self-recovery performance differing across Execution LLMs. Self-recovery can also help agents recover from subsequent errors of the same type and support overall task completion. Intervention should therefore prioritize errors unlikely to self-recover, while allowing agents to continue when self-recovery is likely. Building on these empirical findings, we propose ReCoF, a method that predicts whether an error will self-recover to inform whether additional intervention is needed. ReCoF achieves an average relative improvement of 9.02% in Macro-F1 over the strongest baseline on ReInBench. Our code and data can be found at https://method-notes.github.io/ReCoF/.
1 Introduction
LLM agents provide a means for users to delegate tasks to Web services through natural-language instructions [22]. They mediate users' interactions with Web services by translating goals into actions and interpreting feedback [4]. For example, computer-use agents (CUAs) can operate websites through graphical browser interfaces. Because an agent determines the actions performed on a user's behalf, its errors can result in incorrect requests to Web applications or incomplete task workflows [11]. Error detection is therefore important for enabling timely intervention so that agents' Web interactions satisfy users' goals.
Existing error detection methods inspect action validity and unfolding agent traces. These methods examine the agent's execution context to identify errors or anticipate failures [2, 21]. When a problem is identified, they trigger an intervention, such as requesting a replacement action or injecting corrective guidance into the agent's context [8, 10]. Such interventions aim to redirect execution and restore task progress. However, an agent may also self-recover through continued execution, raising the question of when external intervention is needed and when the agent should be allowed to self-recover.
Some studies examine when external intervention is beneficial by comparing execution with and without observation refresh [15]. These methods estimate when a specific recovery operation improves task outcomes, but do not explicitly characterize the agent's self-recovery process or its role in subsequent execution. External intervention may interrupt this process before the agent has an opportunity to self-recover. Self-recovery may also influence how agents handle later errors within the same task. Reflective feedback from unsuccessful attempts can improve performance in later trials [12], whereas stored experiences can also propagate earlier errors [17]. However, how naturally occurring self-recovery relates to subsequent error handling and overall task completion remains insufficiently understood. Understanding when to intervene therefore requires examining both the agent's ability to self-recover and the consequences of its self-recovery process.
To investigate these issues, we construct ReInBench, a dataset containing 1,259 agent traces and 1,403 error events, of which 725 self-recover within the observed execution. It includes computer-use and Web tasks covering browsing, document and spreadsheet editing, and workflows spanning multiple applications. ReInBench records error occurrence, recognition when observable, and recovery outcomes, together with the corresponding execution context. These records support analysis of self-recovery frequency and speed, its relationship with subsequent error handling and task completion, and self-recovery prediction to inform intervention decisions. We address three research questions.
RQ1 How often and how quickly do agents self-recover from errors, and how does this vary across LLMs?
RQ2 Does self-recovery help agents recover from subsequent errors and complete their tasks?
RQ3 When an error occurs, should we intervene or wait for self-recovery?
Together, these questions examine how agents self-recover, how recovery relates to subsequent execution, and how these findings can inform intervention decisions. Building on the results of these RQs, we design ReCoF, a method that predicts whether an error will self-recover to inform whether additional intervention is needed. On the one hand, ReCoF trains Recovery Pattern Experts on historical execution contexts and recovery outcomes to capture patterns in how agents understand and handle errors. On the other hand, it uses Conditional Decision Fusion to adjust expert contributions according to differences in recovery capability and the difficulty of the current error. Our study makes three contributions.
• We construct ReInBench, a dataset containing 1,259 agent traces and 1,403 error events across computer-use and Web tasks. It records error occurrence, observable recognition, recovery outcomes, and execution context, supporting the study of self-recovery and intervention decisions.
• We conduct an empirical study of errors and self-recovery in LLM agents, examining self-recovery frequency, speed, and variation across Execution LLMs. We further analyze how earlier self-recovery relates to subsequent recovery of same-type and different-type errors, and how local recovery relates to overall task completion.
• We propose ReCoF, a method that predicts whether an error will self-recover to inform whether additional intervention is needed. ReCoF achieves an average relative improvement of 9.02% in Macro-F1 over the strongest baseline on ReInBench.
Figure 1: Agent self-recovery and error detection.
2.1 LLM Agents
An LLM agent is a system that uses an LLM for reasoning and planning, with tools or interfaces that execute actions toward a user-specified goal. In Web applications, agents connect users' instructions to operations on Web services [4]. These operations can be exposed through callable functions or graphical interfaces. Tool-using agents invoke functions with generated arguments [11], whereas computer-use agents interact through mouse and keyboard actions [16]. Both forms of interaction produce feedback that informs later decisions. ReAct describes this interaction as interleaved
Task: Find flights from Seattle to New York on the 5th of next month, showing only flights that can be purchased with miles.
Step 3/ Error onset

Step 4/ Error continues
Step 5/ Recognition
Note: Error onset: 3 Recognition: 5 Local recovery: 8 Screenshots show states after each action.
Figure 2: A Web self-recovery example.
reasoning and acting, in which observations help the agent update its plans and handle exceptions [20].
During this interaction, the agent produces reasoning outputs and actions and receives observations from the environment. The time-ordered record of these steps forms an agent trace, showing how the agent interprets feedback and acts toward the task goal. Figure 1 illustrates the execution loop. Let denote the task goal, the action at step , the observation returned after that action, and the agent's recorded reasoning, if available. With denoting the initial observation, the current trace contains the execution history available after step .
For an execution of T steps, the full agent trace is . The agent selects its next action according to , where denotes the agent's policy. Observations include screenshots, page content, or tool responses, depending on the interaction interface.
2.2 Errors and Self-Recovery
Errors. An error is an incorrect system state that may lead to failure, a deviation from the required service [1]. In LLM agents, errors include misinterpreted task requirements, incorrect tool calls [11], and unsupported assumptions or repeated actions that stall progress [8]. An error detector D evaluates execution against the task goal g using the current trace (Eq. (1)) [21].
Here, flags an error at step , and indicates that no error is detected.
Figure 2 illustrates error onset, recognition, and self-recovery in a Web task trace from ReInBench [18]. At step 3, the agent selects the address bar instead of the departure field. It types “SEA” there at step 4. It recognizes the problem at step 5 and reopens Delta at step 8 to resume the query.
Self-recovery. Self-recovery is the process through which an agent resolves an error using its own subsequent reasoning and actions, without additional external assistance. It follows the original agent policy , including its built-in retry and reflection mechanisms.
[14, 20], and concerns resolution of the local error rather than completion of the entire task. We characterize this process through error onset, recognition, and recovery. Recognition is observable when the agent explicitly acknowledges an error or exhibits targeted corrective behavior. However, some errors reflect temporary deviations in reasoning or action selection and can be resolved as ordinary task execution restores progress. For illustration, suppose an agent has established that one product exceeds the budget and another meets all requirements, but continues switching between their pages without acquiring new information. It subsequently uses the available evidence to select the qualifying product, ending the unproductive loop. Here, continued task reasoning resolves the error without revealing a separate diagnosis of the redundant browsing. Recovery is therefore observable, while a distinct recognition point may not be identifiable. We therefore annotate self-recovery and observable recognition separately.
Intervention timing. Some existing methods respond to detected failures or misbehaviors with corrective guidance. For example, Sentry retrieves failure-specific lessons, while Wink provides targeted course corrections [8, 10]. When self-recovery is possible, the timing of this assistance becomes a separate question. In this study, we represent the choice after an error flag with a response policy .
Intervening supplies external corrective guidance. Waiting allows to continue, with the decision revisited as grows. This timing choice weighs the opportunity for self-recovery against the delay and cost of further execution.
3 ReInBench
ReInBench contains 1,259 agent traces and 1,403 error events from agents performing Web browsing, document and spreadsheet editing, and cross-application workflows. Among these events, 725 self-recover: 553 have an observable recognition point and 172 recover without one. It records error onset, observable recognition, and self-recovery outcomes to support the study of intervention timing. We describe data collection in Section 3.1, annotation in Section 3.2, and experimental settings in Section 3.3.
3.1 Data Collection
We study LLM agents performing Web browsing, desktop application tasks, and cross-application workflows. The tasks include interacting with Web services, editing documents and spreadsheets, and coordinating actions across applications. We construct ReInBench from agent traces collected from two source datasets. OSWorld-Verified [16, 18] contains agent traces generated by computer-use agents (CUAs) built on Claude 3.7 Sonnet, Claude Sonnet 4.5, and Kimi K2.5. These agents perform tasks in browser and desktop applications. For Online-Mind2Web [5, 19], we use the HAL dataset of agent traces generated by SeeAct with GPT-5-2025-08-07 at medium reasoning effort [6]. We refer to the corresponding task groups in ReInBench as OSWorld tasks and Web tasks, respectively. Table 1 summarizes the source datasets and Execution LLMs represented in ReInBench.
Table 1: ReInBench overview.
| Execution LLM | Traces | Errors | Recovered |
|---|---|---|---|
| OSWorld-Verified | 358 tasks | ||
| Claude 3.7 Sonnet | 304 | 588 | 268 |
| Claude Sonnet 4.5 | 339 | 343 | 226 |
| Kimi K2.5 | 343 | 271 | 165 |
| Online-Mind2Web | 273 tasks | ||
| GPT-5 (2025-08-07) | 273 | 201 | 66 |
| Total | 1,259 | 1,403 | 725 |
OSWorld-Verified. We select 1,076 agent traces covering 360 tasks for annotation. The sample includes 360 from CUAs using Claude 3.7 Sonnet, 360 using Claude Sonnet 4.5, and 356 using Kimi K2.5. After checking annotation completeness and event consistency, we retain 986 agent traces covering 358 tasks. These agents operate through graphical computer-use interfaces. Each agent trace pairs agent outputs and actions with screenshots, enabling inspection of the environment before and after corrective actions.
Online-Mind2Web. We check 300 agent traces for field completeness and unique step alignment and select 291 agent traces covering 291 tasks for annotation. Annotation completes for 273 agent traces covering 273 tasks. These agent traces were generated by SeeAct with GPT-5-2025-08-07 at medium reasoning effort on August 13, 2025. Each agent trace records the task instruction, agent outputs, action feedback, and selected-element metadata. The dataset does not include original screenshots or complete DOM snapshots.
3.2 Annotation
Annotation unit and labels. We annotate error events in ReIn-Bench traces, with multiple events allowed per trace. Each event records its onset, the agent's recognition point, and self-recovery point when observable. We also specify a self-recovery criterion that describes the observable state establishing that the error or its task-relevant obstruction has been removed. Onset is the first recorded occurrence of the error. Recognition is the earliest step showing that the agent itself identifies the error through an explicit acknowledgment or targeted corrective behavior. Self-recovery is recorded at the earliest step whose observed state satisfies the criterion. An effective rollback or valid alternative path can establish self-recovery. Self-recovery does not require an observable recognition point: an error may be resolved during the agent's continued execution without an explicit acknowledgment or identifiable targeted correction. Each error event is labeled as recovered or not recovered within the observed trace. A recurrence after verified local self-recovery starts a new event. Repeated failed attempts before self-recovery remain in the same event. For errors involving failed action execution in Web tasks, subsequent action feedback can establish self-recovery when it confirms that the intended action succeeds. A criterion concerning a page or field state requires later feedback or element metadata supporting that state. We establish self-recovery from observable execution evidence that satisfies the event's recovery criterion.
Annotation procedure. We use LLM-assisted annotation followed by expert verification, drawing on prior work on human–LLM collaborative annotation and uncertainty-guided allocation of annotation effort [9, 13]. GPT-6.1-sol and GLM-5.3-Flash independently identify and annotate error events under shared guidelines without access to each other's annotations. Each annotation records the event boundaries, self-recovery outcome and criterion, and references to supporting agent trace records. A verification stage combines rule-based checks with LLM-based evidence review. The two annotations are compared to identify unmatched events and conflicting labels or boundaries. Rule-based checks validate annotation structure, step ranges, temporal consistency, and references to source records. LLM-based review examines the supporting evidence and identifies judgments requiring closer inspection. Disagreements between the annotation LLMs and verifier flags guide the order and depth of expert review. Three researchers studying LLM agents form the expert panel, comprising two doctoral students and one master's student. All three participate in developing the annotation guidelines. Every model-generated annotation undergoes manual verification. Each panel member independently checks whether the error occurs, its onset, the agent's recognition point, the self-recovery outcome and boundary when observable, and the self-recovery criterion and supporting evidence. Reviewers can see the model labels and explanations but not the other members' judgments. When the two annotation LLMs disagree, the panel re-examines the entire agent trace and jointly re-annotates the events through discussion until consensus is reached. This re-annotation reassesses event identification, labels, and temporal boundaries. Ambiguities found during manual verification receive the same full-trace re-annotation. Final decisions follow the annotation guidelines and observable execution evidence. Initial model outputs, verification results, and adjudication records are preserved to make label changes traceable.
3.3 Experimental Settings
For RQ1, we examine self-recovery frequency, recognition and self-recovery timing, and differences across Execution LLMs in ReInBench. First, we investigate how often agents resolve errors through self-recovery. For each LLM, we calculate the proportion of error events that self-recover within the observed agent trace. Second, we investigate how quickly agents self-recover and where delays arise in this process. We measure onset-to-recovery intervals for 600 recovered events in OSWorld tasks and 66 in Web tasks, with identifiable onset and recovery boundaries. As discussed in Section 2.2, self-recovery can occur without a separately observable recognition point. To examine potential bottlenecks in recognition and correction, we therefore use the 509 events in OSWorld tasks and 44 in Web tasks with an observable recognition point between onset and recovery, and compare onset-to-recognition and recognition-to-recovery intervals. Events without an identifiable recognition point contribute only to the end-to-end timing analysis. Third, we investigate how self-recovery varies across Execution LLMs performing the same tasks. We compare self-recovery proportions and timing across the three LLMs on shared tasks. For tasks in which all three LLMs encounter errors, we further compare whether each LLM resolves all of its errors within the observed trace.
For RQ2, we investigate whether prior self-recovery helps agents recover from subsequent errors and complete their tasks. First, to investigate whether agents benefit from earlier self-recovery, we construct ordered error-event pairs within each trace in ReInBench, where has self-recovered before begins. Each recovered event is paired with every subsequent event satisfying this condition. This procedure yields 613 error-event pairs, including 200 same-type pairs and 413 different-type pairs. We annotate each pair as containing either same-type or different-type errors. For example, two errors in which the agent types into the wrong input field form a same-type pair. A wrong-field input error paired with an incorrect file-path error forms a different-type pair. Within these pairs, we examine whether self-recovers to assess whether the recovery experience from may help the agent resolve the later error. When both events recover and their temporal boundaries are identifiable, we compare the number of steps from error onset to recovery to assess whether the later error is resolved faster. We first analyze these patterns across all pairs and then group them according to whether and are the same type of error, to investigate whether subsequent recovery outcomes and speed vary with error similarity. Second, to investigate whether self-recovery supports overall task completion, we analyze recovery at the trace level. For each error-bearing trace, we calculate the proportion of annotated errors that self-recover. Using the recorded task evaluation outcomes, we divide traces into successful and unsuccessful groups and compare their mean self-recovery proportions. We further group traces into those with no recovery, partial recovery, or complete recovery, and compare task completion rates across these groups to examine how the extent of local self-recovery relates to overall task completion.
For RQ3, we investigate when to intervene after an error occurs. An agent may self-recover through continued execution, allowing the task to proceed without external assistance. Immediate intervention may therefore be unnecessary, whereas waiting for an error that remains unresolved can delay task progress. To assess whether intervention is needed, we predict, at the time an error occurs, whether the agent will subsequently self-recover, formulating this prediction as a binary classification task. A predicted self-recovery supports allowing execution to continue, while predicted non-recovery indicates a potential need for assistance. We use the recovery outcomes recorded in ReInBench as target labels, with non-recovery indicating that the error remains unresolved within the observed trace. Inputs include the task goal and up to five recent execution steps ending at the error occurrence, covering recorded reasoning, actions, feedback, and available screenshots. Future execution and recovery annotations are excluded. We propose ReCoF, a method that predicts whether an error will self-recover to inform whether additional intervention is needed. Figure 3 illustrates its workflow. On the one hand, ReCoF trains Recovery Pattern Experts on historical execution contexts and their self-recovery outcomes, learning predictive recovery patterns from text, visual, and joint image-text representations. On the other hand, ReCoF uses an Assessment LLM to examine the task requirements and the Execution LLM's observed reasoning and actions, assessing how difficult the

Figure 3: ReCoF overview.
current error may be for the agent to recover from and providing a contextual verdict. The Conditional Decision Fusion module then uses this verdict to adaptively weight the expert predictions and produce the final self-recovery prediction. Appendix A provides the formal definitions and training procedure. We conduct this evaluation on CUA tasks in ReInBench, using task-disjoint training, validation, and test partitions. We compare methods that can be used to predict self-recovery, including Direct LLM, AgentForesight, Sentry, PrefixGuard, and Wink [7, 8, 10, 21]. These comparisons assess whether the execution context available when an error occurs can support self-recovery prediction and inform the choice between waiting and intervention.
Evaluation metrics. For RQ1, we measure self-recovery frequency as , where and denote recovered and unrecovered error events. Self-recovery speed is measured by onset-to-recovery, onset-to-recognition, and recognition-to-recovery intervals, summarized through their distributions and medians. For RQ2, we report the proportion of later errors that self-recover and compare recovery durations within event pairs. A later recovery is faster or equal when , where and denote the earlier and later recovery durations. At the trace level, we compare mean self-recovery proportions and task completion rates, defined as the proportion of traces that successfully complete their tasks. For RQ3, we report precision, recall, F1, Macro-F1, and accuracy, treating non-recovery as the positive class. Precision and recall are and , with . Macro-F1 gives equal weight to both classes, calculated as .
Comparison methods. For RQ3, we compare ReCoF with the following methods, adapting existing monitoring approaches to self-recovery prediction.
• Direct LLM directly predicts whether an error will self-recover from the task goal and available execution context.
• AgentForesight [21] identifies decisive errors from the execution context. We adapt its forecasting procedure to distinguish errors that will self-recover from those that will remain unresolved.
• Sentry [8] monitors execution using knowledge learned from previous failures. We adapt its failure taxonomy to guide self-recovery prediction from the task goal and execution context.
• PrefixGuard [7] learns event representations and uses a recurrent predictor to estimate failure risk from the execution context. We adapt its prediction target to whether the current error will self-recover.
• Wink [10] identifies specification drift, reasoning problems, and tool call failures to guide corrective intervention. We adapt its misbehavior analysis to predict self-recovery without executing the intervention.
To examine the contributions of ReCoF’s components, we evaluate two ablation variants.
-
w/o Recovery Pattern Experts removes the expert predictions and their conditional interactions, retaining the Assessment LLM’s contextual verdict and Execution LLM identity.
-
w/o Conditional Interaction removes only the interaction terms, retaining both the expert predictions and contextual verdict, together with Execution LLM identity.
Each variant is refitted and calibrated using the validation set. We further examine parameter sensitivity by separately varying the fusion regularization parameter C, the number of task-grouped folds K, and the offset from the calibrated decision threshold, while holding the remaining configuration fixed.
Implementation details. For RQ3, we use GLM-5.3-Flash as ReCoF's Assessment LLM and for the LLM-based baselines, with temperature set to zero. These methods receive the task goal and up to five steps of execution context ending at the error occurrence, including execution text and available screenshots. We use task-disjoint partitions containing 559 training, 228 validation, and 238 test events. ReCoF uses frozen text, visual, and joint image-text encoders to train its Recovery Pattern Experts. Its logistic fusion uses C = 0.01 and three task-grouped folds on the validation set. We retain the three fold models, average their test probabilities, and calibrate a separate decision threshold for each Execution LLM using validation predictions. PrefixGuard uses 4,096-dimensional TF-IDF features and a GRU predictor, trained for 24 epochs with AdamW at a learning rate of . Its checkpoint and thresholds are selected using validation Macro-F1. We report results over five seeds for PrefixGuard, ReCoF, and its ablations, keeping ReCoF's Recovery Pattern Experts and Assessment LLM outputs fixed across fusion runs.
4 Results
4.1 Self-Recovery Performance (RQ1)
Figure 4 compares self-recovery proportions and task-level overlap in ReInBench. Figure 5 shows the timing of error recognition and self-recovery. We make the following observations.
Agents self-recover from a substantial share of errors. In ReInBench, 659 of 1,202 errors in OSWorld tasks self-recover within the observed agent trace, yielding a proportion of 54.8%. For Web tasks, 66 of 201 errors self-recover, yielding 32.8%. These results show that agents can resolve many local errors through continued execution without additional external assistance. Self-recovery is therefore an important consideration when deciding whether to intervene after an error occurs.

(a) Recovery proportions

(b) Task overlap
Figure 4: Self-recovery across Execution LLMs.
Self-recovery is generally fast, but correction can require prolonged execution. Figure 5a shows that end-to-end recovery durations concentrate within the first few steps, with medians of two steps for OSWorld tasks and three steps for Web tasks. Figures 5b,c further show that onset-to-recognition intervals are concentrated around one step, whereas recognition-to-recovery intervals are more dispersed. For OSWorld tasks, 73.3% of events with observable recognition recover within two subsequent steps. However, the correction distributions extend beyond the initial peak, particularly for Web tasks, indicating that recognizing an error does not always lead to an immediate resolution. The end-to-end distributions also exhibit long tails, with recovery durations reaching 78 steps for OSWorld tasks and 48 steps for Web tasks. These results suggest that a short continuation allows many errors to resolve, while some require substantially more execution before recovery.
Execution LLMs differ in both self-recovery frequency and task coverage. Figure 4a shows self-recovery proportions on ReInBench's OSWorld tasks of 45.6% for Claude 3.7 Sonnet, 65.9% for Claude Sonnet 4.5, and 60.9% for Kimi K2.5. On shared tasks with errors in all three LLMs, the proportions are 43.8%, 64.4%, and 52.7%, respectively. Sonnet 4.5 exceeds Claude 3.7 by 20.6 percentage points on these shared tasks, so its higher self-recovery proportion within the Claude family persists on the same task set. Figure 4b further compares task-level recovery across these LLMs. A task belongs to an LLM's set when all of its annotated errors recover. We normalize percentages over shared tasks meeting this condition for at least one LLM. Within this pool, 7.8% satisfy the condition for all three LLMs, whereas 52.9% do so for only one. Claude Sonnet 4.5 and Kimi K2.5 share a pair-only region of 25.5%. The overlap shows that the tasks on which all annotated errors self-recover differ across Execution LLMs. Across the broader shared-task set, each LLM has a median observed recovery duration of two steps, indicating similar typical recovery speed despite differences in recovery frequency and task coverage.
4.2 Subsequent Execution (RQ2)
Figure 6 examines whether self-recovery from earlier errors in ReIn-Bench helps agents recover from subsequent errors and do so more quickly. Figure 7 investigates whether self-recovery helps agents complete the overall task. We make the following observations.
Self-recovery experience helps agents recover from subsequent errors of the same type. Across all 613 error-event pairs, 56.8% of later errors self-recover, while this proportion reaches 76.0% for same-type pairs (Figure 6a). Recovering from an earlier error may provide useful feedback and corrective actions that the agent can reuse when encountering a similar error within the same task. The recovery-duration comparisons further support this interpretation. We compare recovery speed using the number of steps taken to recover from the earlier and later errors within each pair. For same-type pairs, 79.4% of later recoveries take no more steps than the earlier recovery, compared with 63.5% overall (Figure 6b,c). However, evidence that earlier recovery experience helps agents recover from different-type errors remains limited. For these pairs, 47.5% of later errors self-recover, and 52.5% of later recoveries are faster or equal in duration. Earlier recovery strategies may be less directly applicable because different-type errors can require different information or corrective actions. Different error types may also vary in difficulty and the number of steps needed for recovery, which can contribute to the observed duration differences.
Self-recovery can support overall task completion. Self-recovery addresses local errors, so we further examine whether its benefits extend to overall task completion. Figure 7b shows that successful traces have a higher mean proportion of recovered errors than unsuccessful traces, at 71.9% versus 37.8%. Figure 7a further shows how task completion varies with the extent of recovery. Among 727 error-bearing traces, the completion rate reaches 60.0% when all annotated errors recover, compared with 20.6% when none recover and 18.0% when only some recover. Complete recovery is accompanied by a higher task completion rate, whereas partial recovery has a rate similar to no recovery. Although recovering from individual errors can restore progress, other unresolved errors may continue to obstruct execution and prevent task completion.
4.3 Intervention Timing (RQ3)
RQ3 asks when to intervene after an error occurs and when to allow the agent to self-recover. RQ1 shows that agents often self-recover within a few steps, so an error may already be resolved by the time external intervention takes effect. RQ2 further indicates that self-recovery can support subsequent error handling and overall task success. Together, these findings suggest that choosing between intervention and waiting requires predicting whether the current error will self-recover. We therefore investigate whether the execution context available when an error occurs can support this prediction and inform the intervention decision.
To investigate this question, we propose ReCoF, a method that predicts whether an error will self-recover to inform whether additional intervention is needed. Its design draws on two insights from RQ1 and RQ2. RQ1 shows that self-recovery performance differs across Execution LLMs, motivating predictions that account for the Execution LLM and its task context. RQ2 further suggests that agents' self-recovery processes reflect how they understand and handle errors, providing information useful for predicting recoverability. Accordingly, ReCoF incorporates two core components. Recovery Pattern Experts use text, visual, and joint image-text representations of historical execution contexts, together with their recovery outcomes, to learn patterns that reflect how agents understand and handle errors. Conditional Decision Fusion uses the Assessment LLM to assess the current error in relation to the task.

Figure 5: Self-recovery timing.
Table 2: Self-recovery prediction and core ablations on ReInBench.
| Method / variant | Claude 3.7 Sonnet | Claude Sonnet 4.5 | Kimi K2.5 | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| M-F1 | F1 | Prec. | Rec. | Acc. | M-F1 | F1 | Prec. | Rec. | Acc. | M-F1 | F1 | Prec. | Rec. | Acc. | |
| Direct LLM | 68.75 | 62.50 | 69.77 | 56.60 | 70.00 | 72.88 | 63.41 | 72.22 | 56.52 | 76.19 | 61.69 | 47.06 | 50.00 | 44.44 | 67.27 |
| AgentForesight | 61.49 | 47.37 | 78.26 | 33.96 | 66.67 | 68.89 | 55.56 | 76.92 | 43.48 | 74.60 | 47.78 | 17.39 | 40.00 | 11.11 | 65.45 |
| Sentry | 61.10 | 48.78 | 68.97 | 37.74 | 65.00 | 72.88 | 63.41 | 72.22 | 56.52 | 76.19 | 50.82 | 24.00 | 42.86 | 16.67 | 65.45 |
| PrefixGuard | 58.59±3.19 | 59.40±1.77 | 52.96±3.40 | 68.30±6.86 | 58.83±3.15 | 47.50±6.74 | 22.34±8.39 | 41.19±17.81 | 15.65±5.83 | 59.68±7.24 | 55.43±5.72 | 43.85±8.22 | 42.90±8.71 | 50.00±17.12 | 59.64±8.47 |
| Wink | 66.26 | 59.79 | 65.91 | 54.72 | 67.50 | 66.09 | 52.63 | 66.67 | 43.48 | 71.43 | 41.56 | 18.18 | 20.00 | 16.67 | 50.91 |
| w/o Recovery Pattern Experts | 68.75 | 62.50 | 69.77 | 56.60 | 70.00 | 72.88 | 63.41 | 72.22 | 56.52 | 76.19 | 61.69 | 47.06 | 50.00 | 44.44 | 67.27 |
| w/o Conditional Interaction | 71.14±2.34 | 68.01±1.95 | 69.32±5.98 | 68.30±10.87 | 71.83±2.53 | 61.50±7.72 | 45.28±14.25 | 60.07±3.62 | 38.26±17.77 | 68.57±3.79 | 69.74±2.35 | 53.76±3.98 | 87.42±1.13 | 38.89±3.93 | 78.18±1.29 |
| ReCoF | 73.53±2.33 | 71.61±0.31 | 69.56±5.62 | 74.72±7.01 | 73.83±2.54 | 74.18±3.44 | 66.83±2.04 | 72.19±13.27 | 64.35±8.36 | 76.51±4.55 | 72.99±2.93 | 62.74±2.93 | 71.05±14.67 | 58.89±9.30 | 77.09±4.19 |
Values are percentages. M-F1: Macro-F1. F1, precision and recall treat observed non-recovery as positive. Bold red values mark the highest mean in each Execution LLM-metric group. Smaller values give ± sample standard deviation over five seeds: classifier-training seeds for PrefixGuard and fusion-layer seeds for ReCoF and its ablations. ReCoF's Recovery Pattern Experts and Assessment LLM outputs are held fixed. API baselines use cached predictions. Ablations are refitted and calibrated on validation data. SDs are omitted for w/o Recovery Pattern Experts because its predictions are identical across seeds.
(a) Later recovery

(b) Same type

(c) Different type

Faster or equal Slower
Figure 6: Subsequent error recovery.
(a) Task completion

(b) Error composition

Figure 7: Task completion and self-recovery.
requirements and the Execution LLM's observed reasoning and actions. It combines this contextual verdict with the Execution LLM's

Figure 8: Parameter sensitivity.
identity and adaptively weights the expert predictions, accounting for differences in recovery capability across models and the difficulty of the current error.
We compare ReCoF with five baselines that can be used to predict self-recovery, including Direct LLM, AgentForesight, Sentry, PrefixGuard, and Wink. We further examine the contributions of its core components through ablation experiments and assess its sensitivity to parameter choices. Table 2 and Figure 8 present the results. We make the following observations.
Execution context available when an error occurs can help distinguish self-recovery from non-recovery. ReCoF achieves mean Macro-F1 scores of 73.53%, 74.18%, and 72.99% for Claude 3.7 Sonnet, Claude Sonnet 4.5, and Kimi K2.5, respectively, exceeding the strongest baseline for each Execution LLM by 4.78, 1.30, and 11.30 percentage points. Its non-recovery recall also increases from 56.60% to 74.72%, from 56.52% to 64.35%, and from 44.44% to 58.89%, respectively. The improvement is smallest for Sonnet 4.5, where Direct LLM and Sentry already provide competitive predictions. These results show that information available at error occurrence supports self-recovery prediction, and combining learned recovery patterns with contextual assessment helps identify more errors that remain unresolved.
Historical recovery patterns and contextual assessment provide complementary evidence of recoverability. Removing the Recovery Pattern Experts reduces Macro-F1 to 68.75%, 72.88%, and 61.69% across the three Execution LLMs. This variant produces the same binary predictions as Direct LLM, showing that historical recovery patterns provide useful information beyond the Assessment LLM's contextual verdict. Removing the conditional interaction while retaining both prediction sources reduces Macro-F1 to 71.14%, 61.50%, and 69.74%. The benefit therefore comes from both the available prediction sources and how their contributions are combined. For Kimi, removing the interaction increases non-recovery precision to 87.42% but lowers recall to 38.89%, compared with 71.05% precision and 58.89% recall for ReCoF. Conditioning expert contributions on the contextual verdict improves the balance between precision and recall, helping identify unresolved errors while limiting incorrect non-recovery predictions.
ReCoF maintains stable prediction performance around the chosen configuration. Figure 8 shows that small threshold offsets of change mean Macro-F1 by at most approximately 1.43 percentage points. Using five or ten task folds also yields competitive results across the three Execution LLMs. These results indicate that ReCoF's performance does not depend on a single precise parameter setting. Performance declines under weaker regularization, particularly for Sonnet 4.5, suggesting that constraining the fusion weights helps limit overfitting. Larger threshold offsets also reduce performance, highlighting the value of validation-based calibration.
Deciding when to intervene requires considering whether the agent can self-recover. Our results show that this distinction can be assessed from the execution context available when an error occurs. By improving self-recovery prediction across Execution LLMs, ReCoF provides a basis for allowing agents likely to self-recover to continue and directing external assistance toward errors likely to remain unresolved.
4.4 Threats to Validity
Dataset coverage. ReInBench covers a limited set of Execution LLMs, task environments, and error types. Self-recovery behavior may differ across applications, task complexity, and model capabilities, so the observed patterns may not generalize to all agent settings. Broader coverage of models, tasks, and error scenarios is needed to assess the generality of our findings. When and how to intervene. Our study focuses on when to intervene by predicting whether an error will self-recover. However, the effectiveness of intervention also depends on how assistance is provided, including its content and compatibility with the agent's current execution. RQ3 evaluates self-recovery prediction without executing interventions. Further experiments are needed to examine how intervention timing and intervention methods jointly affect task completion.
5 Related Work
5.1 Self-Recovery in LLM Agents
Prior work studies recovery through model training and controlled evaluation. GUI-Reflection trains GUI agents for self-reflection and error correction [14]. GUI-RobustEval and RoTS provide executable recovery test cases and synthesized trajectories to evaluate and improve recovery capabilities [3]. Our study examines naturally occurring self-recovery during agents' original execution. ReInBench records error occurrence, observable recognition, and recovery, enabling analysis of how often and how quickly agents self-recover and how recovery performance varies across Execution LLMs.
Experience-based methods investigate how earlier execution influences later behavior. Reflexion uses stored reflections to guide subsequent trials [12], while Xiong et al. examine how memory management affects experience reuse [17]. Our analysis examines recovery experience arising during the agent's continued execution within the same trace. We compare subsequent recovery outcomes and durations for same-type and different-type errors and examine how local self-recovery relates to overall task completion.
5.2 Errors and Intervention
Existing monitoring methods identify problematic execution or anticipate failure. AgentForesight identifies decisive errors associated with eventual failure [21], while PrefixGuard learns execution representations for failure prediction and diagnosis [7]. Their original targets concern decisive errors or task failure. Our target is whether a particular local error will subsequently self-recover.
Recovery systems additionally study how to assist agents. Wink monitors coding-agent misbehaviors and supplies corrective guidance . Sentry diagnoses failures and retrieves verified recovery lessons to guide intervention . These systems also acknowledge self-recovery through observations of redundant guidance or comparisons with unaided continuations. Xiao et al. compare execution with and without observation refresh and learn when this intervention improves task outcomes . Their decision concerns the expected benefit of a specific recovery operation.
Our study focuses on when to intervene by examining whether an error will self-recover through continued execution. Self-recovery is relevant to this choice because an observed error may be resolved without additional assistance. We systematically analyze this behavior and adapt existing monitoring and diagnosis methods to self-recovery prediction. We further propose ReCoF to combine learned recovery patterns with contextual assessment, providing a basis for deciding whether to allow continued execution or consider external intervention.
6 Conclusion
In this paper, we presented an empirical study of errors and self-recovery in LLM agents to investigate when external intervention is needed. We constructed ReInBench to analyze self-recovery across computer-use and Web tasks. Our results show that agents self-recover from a substantial share of errors, often within a few steps, with recovery performance differing across Execution LLMs. Self-recovery can also help agents handle subsequent errors of the same type and support overall task completion. These findings motivate allowing opportunities for self-recovery and prioritizing intervention for errors likely to remain unresolved. Building on the empirical findings, we proposed ReCoF, a method that predicts whether an error will self-recover to inform whether additional intervention is needed. ReCoF achieves an average relative improvement of 9.02% in Macro-F1 over the strongest baseline on ReInBench. Our study establishes self-recovery as an important consideration in intervention decisions. Future work will broaden the coverage of ReInBench and examine how intervention timing and intervention methods jointly affect task completion.
References
[1] Algirdas Avizienis, Jean-Claude Laprie, Brian Randell, and Carl Landwehr. 2004. Basic Concepts and Taxonomy of Dependable and Secure Computing. IEEE Transactions on Dependable and Secure Computing 1, 1 (2004), 11–33. doi:10.1109/TDSC.2004.2
[2] Ohav Barbi, Ori Yoran, and Mor Geva. 2025. Preventing Rogue Agents Improves Multi-Agent Collaboration. In Proceedings of the 1st Workshop for Research on Agent Language Models (REALM 2025). Association for Computational Linguistics, Vienna, Austria, 486–511. https://aclanthology.org/2025.realm-1.34/
[3] Tianpeng Bu, Xin Liu, Qihua Chen, Hao Jiang, Shurui Li, Hongtao Duan, Lu Jiang, Lulu Hu, Bin Yang, and Minying Zhang. 2026. Recovering Policy-Induced Errors: Benchmarking and Trajectory Synthesis for Robust GUI Agents. In Proceedings of the 43rd International Conference on Machine Learning (Proceedings of Machine Learning Research, Vol. 306). PMLR, 10111–10146. https://proceedings.mlr.press/v306/bu26b.html
[4] Hongru Cai, Yongqi Li, Wenjie Wang, Fengbin Zhu, Xiaoyu Shen, Wenjie Li, and Tat-Seng Chua. 2025. Large Language Models Empowered Personalized Web Agents. In Proceedings of the ACM on Web Conference 2025. Association for Computing Machinery, New York, NY, USA, 198–215. doi:10.1145/3696410.3714842
[5] Xiang Deng, Yu Gu, Boyuan Zheng, Shijie Chen, Samuel Stevens, Boshi Wang, Huan Sun, and Yu Su. 2023. Mind2Web: Towards a Generalist Agent for the Web. In Advances in Neural Information Processing Systems, Vol. 36. Curran Associates, Inc., 28091–28114. https://proceedings.neurips.cc/paper_files/paper/2023/file/5950bf290a1570ea401bf98882128160-Paper-Datasets_and_Benchmarks.pdf
[6] HAL. 2025. SeeAct: Online-Mind2Web Agent Performance and Archived Traces. Holistic Agent Leaderboard. https://hal.cs.princeton.edu/agent/SeeAct GPT-5 medium run dated August 13, 2025; accessed October 18, 2026.
[7] Xinmiao Huang, Jinwei Hu, Qisong He, Rajarshi Roy, Changshun Wu, Yi Dong, and Xiaowei Huang. 2026. PrefixGuard: Online Failure Warning and Trace-Grounded Diagnosis for LLM Agents. arXiv preprint arXiv:2605.06455 (2026). https://arxiv.org/abs/2605.06455v2 Version 2, September 27, 2026.
[8] Changxiu Ji, Amy Lu, Qizheng Zhang, and Kunle Olukotun. 2026. Sentry: Learning to Recover from LLM Agent Failures at Test Time. arXiv preprint arXiv:2610.02994 (2026). https://arxiv.org/abs/2610.02994v1 Version 1, October 2, 2026.
[9] Minzhi Li, Taiwei Shi, Caleb Ziems, Min-Yen Kan, Nancy F. Chen, Zhengyuan Liu, and Diyi Yang. 2023. CoAnnotating: Uncertainty-Guided Work Allocation between Human and Large Language Models for Data Annotation. In Proceedings of the 2023 Conference on Empirical Methods in Natural Language Processing. Association for Computational Linguistics, Singapore, 1487–1505. doi:10.18653/v1/2023.emnlp-main.92
[10] Rahul Nanda, Chandra Maddila, Smriti Jha, Euna Mehnaz Khan, Satish Chandra, and Matteo Paltenghi. 2026. Wink: Recovering from Misbehaviors in Coding Agents. In Proceedings of the 3rd ACM International Conference on AI-powered Software (AIware '26). Association for Computing Machinery, New York, NY, USA. doi:10.1145/3805760.3814911
[11] Zhengliang Shi, Shen Gao, Lingyong Yan, Yue Feng, Xiuyi Chen, Zhumin Chen, Dawei Yin, Suzan Verberne, and Zhaochun Ren. 2025. Tool Learning in the Wild: Empowering Language Models as Automatic Tool Agents. In Proceedings of the ACM on Web Conference 2025. Association for Computing Machinery, New York, NY, USA, 2222–2237. doi:10.1145/3696410.3714825
[12] Noah Shinn, Federico Cassano, Ashwin Gopinath, Karthik Narasimhan, and Shunyu Yao. 2023. Reflexion: Language Agents with Verbal Reinforcement Learning. In Advances in Neural Information Processing Systems, Vol. 36. https://proceedings.neurips.cc/paper_files/paper/2023/file/1b44b878bb782e6954cd888628510e90-Paper-Conference.pdf
[13] Xinru Wang, Hannah Kim, Sajjadur Rahman, Kushan Mitra, and Zhengjie Miao. 2024. Human-LLM Collaborative Annotation Through Effective Verification of LLM Labels. In Proceedings of the CHI Conference on Human Factors in Computing Systems. Association for Computing Machinery, New York, NY, USA, Article 303, 21 pages. doi:10.1145/3613904.3641960
[14] Penghao Wu, Shengnan Ma, Bo Wang, Jiaheng Yu, Lewei Lu, and Ziwei Liu. 2025. GUI-Reflection: Empowering Multimodal GUI Models with Self-Reflection Behavior. In Advances in Neural Information Processing Systems, Vol. 38. https://papers.nips.cc/paper_files/paper/2025/hash/937ae0e83eb08d2cb8627fe1def8c751-Abstract-Conference.html
[15] Shuyao Xiao, Shengling Wang, Xuan Chen, Ke Chao, Ming Cui, Feifei Qian, Chaoyang Mei, Fanlin Meng, Ziming Yu, and Junxi Yin. 2026. When Harnesses Lose the Signal: Causal Evaluation of Recovery in LLM Agents. arXiv preprint arXiv:2610.00372 (2026). https://arxiv.org/abs/2610.00372v1 Version 1.
[16] Tianbao Xie, Danyang Zhang, Jixuan Chen, Xiaochuan Li, Siheng Zhao, Ruisheng Cao, Toh Jing Hua, Zhoujun Cheng, Dongchan Shin, Fangyu Lei, Yitao Liu, Yiheng Xu, Shuyan Zhou, Silvio Savarese, Caiming Xiong, Victor Zhong, and Tao Yu. 2024. OSWorld: Benchmarking Multimodal Agents for Open-Ended Tasks in Real Computer Environments. In Advances in Neural Information Processing Systems, Vol. 37. https://proceedings.neurips.cc/paper_files/paper/2024/hash/5d413e48f84dc61244b6be550f1cd8f5-Abstract-Datasets_and_Benchmarks_Track.html
[17] Zidi Xiong, Yuping Lin, Wenya Xie, Pengfei He, Zirui Liu, Jiliang Tang, Himabindu Lakkaraju, and Zhen Xiang. 2026. How Memory Management Impacts LLM Agents: An Empirical Study of Experience-Following Behavior. In Proceedings of the 64th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers). Association for Computational Linguistics, 623–645. doi:10.18653/v1/2026.acl-long.27
[18] xlangai. n.d.. OSWorld-Verified Model Trajectories. Hugging Face dataset. https://huggingface.co/datasets/xlangai/ubuntu_osworld_verified_trajs Accessed October 15, 2026.
[19] Tianci Xue, Weijian Qi, Tianneng Shi, Chan Hee Song, Boyu Gou, Dawn Song, Huan Sun, and Yu Su. 2025. An Illusion of Progress? Assessing the Current State of Web Agents. In Second Conference on Language Modeling. https://openreview.net/forum?id=6jZi4HSs6o
[20] Shunyu Yao, Jeffrey Zhao, Dian Yu, Nan Du, Izhak Shafran, Karthik Narasimhan, and Yuan Cao. 2023. ReAct: Synergizing Reasoning and Acting in Language Models. In International Conference on Learning Representations. https://arxiv.org/abs/2210.03629
[21] Boxuan Zhang, Jianing Zhu, Zeru Shi, Dongfang Liu, and Ruixiang Tang. 2026. AgentForesight: Online Auditing for Early Failure Prediction in Multi-Agent Systems. arXiv preprint arXiv:2605.08715 (2026). https://arxiv.org/abs/2605.08715v1 Version 1, May 9, 2026.
[22] Shuyan Zhou, Frank F. Xu, Hao Zhu, Xuhui Zhou, Robert Lo, Abishek Sridhar, Xianyi Cheng, Tianyue Ou, Yonatan Bisk, Daniel Fried, Uri Alon, and Graham Neubig. 2024. WebArena: A Realistic Web Environment for Building Autonomous Agents. In International Conference on Learning Representations. https://openreview.net/forum?id=oKn9c6ytLx
A Detailed Description of ReCoF
ReCoF predicts whether an error will self-recover to inform whether additional intervention is needed. Recovery Pattern Experts learn the relationship between historical execution contexts and recovery outcomes. Conditional Decision Fusion relates these predictions to the Assessment LLM's contextual verdict and the Execution LLM's identity. This appendix formalizes both components and their training procedure.
A.1 Prediction Task and Available Context
Let denote an error occurring at step in trace , and let denote its Execution LLM. Following the notation in Section 2.1, , , , and denote the task goal, recorded reasoning, action, and resulting observation. ReCoF receives the recent execution context
where . Observations include available feedback and screenshots. The final step includes the recorded observation after the action at error occurrence. The target error step is supplied. Retrospective error descriptions and execution after are excluded. The prediction target is
Thus, non-recovery is the positive class. This target concerns the local error rather than final task completion. A common observation boundary makes historical training examples and prediction-time inputs comparable. Historical recovery outcomes supply the supervision. The predictor must infer each outcome from information available at error occurrence.
A.2 Recovery Pattern Experts
The agent’s interpretation of the task, the visible application state, and recent changes in execution provide evidence about recoverability. Recovery Pattern Experts use multiple feature views and classifiers to learn how this evidence relates to recovery outcomes.
Execution representations. Frozen encoders provide text, visual, and joint image-text features. Text features represent the task, the ordered execution text, the error-occurrence step, and recorded reasoning. Visual features represent screenshot content and coarse spatial regions. Joint image-text features encode the task, Execution LLM identity, and the interleaved reasoning, actions, and available screenshots in the five-step context. The encoders are Qwen3-Embedding-0.6B, SigLIP2, and Qwen3-VL-Embedding-2B, respectively. Screenshots enter the visual and joint encoders directly. SigLIP2 patch features are spatially reduced and cached. Applying its pretrained pooling head to these cached features provides an additional visual view.
Recent changes complement the context as a whole. Let denote a reasoning embedding and a pooled screenshot feature. The corresponding summary features include
where the bars denote window means and brackets with commas denote vector concatenation. Missing features are represented by zero vectors with availability indicators in the auxiliary descriptors. A one-step context has a zero temporal difference. Additional descriptors summarize action types and parameters, repeated actions, and textual cues. These features characterize the current execution state and recent changes.
Expert predictions. An expert selects a feature view and produces a non-recovery score . The expert bank includes multi-view, pretrained-visual, joint image-text, joint MLP, partially pooled, and robust RBF predictors, together with an ensemble derived from validation-subset voting. For the multi-view, pretrained-visual, and joint image-text predictors, we fit candidate classifiers on the corresponding feature representations and select each predictor using validation performance. The joint MLP uses a compact nonlinear head, whereas RBF predictors compare nonlinear neighborhoods in the encoded feature space. Classifier parameters are fitted on training events, and configurations are selected using validation events. Outputs are mapped to . For an SVM, this mapping applies a sigmoid to its decision score.
Most expert families use model-specific predictors. The partially pooled family also shares information across Execution LLMs through the kernel
where controls the relative contribution of examples from the same Execution LLM. When , the kernel depends only on feature similarity. Increasing reduces the weight assigned to examples from other Execution LLMs. Prediction scores are collected in the vector
where D denotes the number of prediction score channels. The robust RBF predictor is selected by the lower decile of bootstrap validation AUC. The ensemble entry uses the first five selected predictor families. In each of 200 label-stratified validation subsets containing 70% of each class, it selects a predictor and threshold by Macro-F1. Its test score is the fraction of non-recovery votes. For a validation event, only votes from subsets excluding that event contribute to its ensemble score.
This design connects historical recovery outcomes to observable execution patterns. Separate text and visual views retain evidence about the agent's interpretation and the application state. The joint view captures their relationship. Temporal summaries indicate how that evidence changes near the error. Different classifier families provide alternative decision boundaries over these representations. Model-specific predictors preserve differences in recovery capability, while partial pooling permits shared patterns across Execution LLMs. Freezing the encoders concentrates supervised learning on the prediction layers, limiting the number of parameters learned from the annotated events.
A.3 Conditional Decision Fusion
Similar execution patterns can have different recovery outcomes under different task requirements. Conditional Decision Fusion uses contextual assessment to adjust expert contributions to the current error context.
Contextual verdict. The Assessment LLM receives the task goal and five-step execution text. It also receives the screenshot at error occurrence, when recorded, and the most recent earlier screenshot in the same window. Its instruction distinguishes correcting the target error from completing the task and asks whether the error will self-recover. The Assessment LLM returns a binary verdict , with for predicted non-recovery and for predicted self-recovery. ReCoF uses this verdict to condition the contribution of the expert predictions.
Conditional interaction. Let be the one-hot identity of the Execution LLM, with in our experiments. We construct
where denotes element-wise multiplication by the broadcast scalar. The fusion vector has dimensions. For fusion fold , the non-recovery probability is
(10)
where is the sigmoid, and and are the feature means and standard deviations fitted on that fold's training rows. Zero-variance coordinates use a scale of one.
The interaction changes how the verdict affects expert evidence. In the unclipped region, after absorbing affine scaling into the coefficients, the contribution of expert j has the effective coefficient
Consequently, the same expert score can receive different contributions under predicted self-recovery and predicted non-recovery. Without the interaction, the verdict changes only an additive term in the logit. Execution LLM identity contributes a model-specific additive adjustment. Model-specific experts and decision thresholds provide the remaining adaptation to the Execution LLM.
This design lets the fusion learn when to reinforce or discount historical predictions according to the contextual verdict. The direct contribution of the Assessment LLM and its interaction with each expert are learned from recovery outcomes. By conditioning expert contributions on the contextual verdict and incorporating the Execution LLM's identity, ReCoF accounts for both the current error context and differences in recovery capability.
A.4 Fusion Training and Decision Calibration
The base experts are fixed before fusion training. We divide validation tasks into folds, assigning every event from the same task to the same fold. Each fusion model is fitted on the other folds. For its training set , let and let count examples from Execution LLM with label . We use weights , giving equal total weight to each model-class group. The regularized logistic objective is
(12)
with . Grouping by task prevents related events from appearing in both sides of a fusion fold. Balancing model-class groups prevents the largest execution-model or outcome group from dominating the objective. Regularization limits the complexity of the conditional score combinations.
Each validation event receives an out-of-fold probability from the fusion model that excludes its task. For each Execution LLM m, we draw label-stratified bootstrap samples from these validation predictions. If maximizes Macro-F1 in draw , the final threshold is . Candidate thresholds are the midpoints between consecutive distinct validation scores, two boundary candidates, and 0.5. Ties favor the candidate closest to 0.5, then the smaller value. At prediction time,
The fold models are retained without a final refit. Averaging reduces dependence on one validation partition, while model-specific thresholds accommodate differences in decision calibration. The median of bootstrap optima reduces dependence on a single small validation sample. The validation partition is used for expert selection and fusion calibration. The task-grouped folds provide out-of-fold predictions for the fusion layer, and final performance is evaluated on the task-disjoint test partition.
ReCoF uses the execution context available at error occurrence to distinguish errors likely to self-recover from those likely to remain unresolved. These predictions provide a basis for deciding when to allow continued execution and when to prioritize external intervention.
