Manuscript Offprint

arXiv:2611.09792

Knowing When to Intervene: Causal Evaluation of AI Agents

Ayush Sawarni, Wenqian Xing, Tijana Zrnic, Ramesh Johari, Vasilis Syrgkanis

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

Current evaluations of agentic AI systems primarily rely on benchmarks. However, the static nature of benchmarks makes them uninformative about the value of auditing interventions at deployment time. For reliable deployment, we often need to determine within an agent's trajectory whether or not to intervene, e.g., by verifying the agent's current output or steering it toward different behavior, using either human review or more costly models or time-consuming agentic supervision. The value of such interventions is fundamentally a causal inference question, asking whether the causal effect of such an intervention is beneficial for the final outcome. Estimating this causal effect is particularly challenging due to the dynamic nature of the problem: the impact of an intervention depends on the current context and environment, as well as the agent's future behavior. We develop the first methodologically grounded framework for evaluating the causal effects of randomized interventions within agent trajectories. By leveraging a relatively small dataset of agent trajectories collected under randomized interventions such as verification or screening, we can estimate the dynamic causal effect of a rich class of (contextual) intervention policies. The structural parameters that we estimate can also be used to construct safety leaderboards that capture the risk of various agentic actions, which can be used by practitioners for audit prioritization. Applying our methods to τ\tau-bench Retail, ToolSandbox, and ImpossibleBench [3, 18, 30, 32], we find that intervention effects vary substantially across agent actions and states. More broadly, our work suggests a rich research agenda at the intersection of causal inference and agentic evaluation, which we believe is essential for the reliable and safe deployment of AI agents in the real world.¹

1 Introduction

Agentic AI systems are designed to solve complex, long-horizon tasks through a sequence of decisions and tool calls in interactive environments. Current evaluations of these systems typically rely on benchmarks, each of which fixes a set of tasks, an environment with its tools and instructions, and criteria for scoring the outcome [3, 13, 17, 30, 33]. For example, in τ\tau-bench Retail [30], a customer-support agent interacts with simulated customers, retrieves account information, and manages orders through external tools. The task outcomes then depend on the entire trajectory of interactions between the agent and the environment. While a valuable source of data for characterizing agent capabilities and safety, benchmarks have significant limitations in guiding how we intervene during real-world use.

In real-world deployments, humans need to determine within an agent's trajectory whether or not to intervene, e.g., by verifying a proposed tool call, steering the agent toward a different action,

*Corresponding author ¹We used ChatGPT, Codex, Claude, and Claude Code to assist with writing, implementing experiments, and analyzing results. The authors take responsibility for the manuscript and results.

or screening potentially adversarial content. This review process can correspond to either human review in high-stakes domains, or, in medium-stakes domains, to more costly (and more powerful) model supervision, or supervision via a more time-consuming agentic harness. For instance, would reviewing a proposed database write prevent a task failure, or would withholding an adversarial message prevent an agent from violating its instructions? Such decisions are fundamentally causal inference questions: the user must determine whether applying an intervention would improve the final outcome.

Estimating this causal effect is particularly challenging because it is a dynamic treatment effect problem. The impact of an intervention during task execution depends on the current context and environment, as well as the agent's future behavior under its policy. In particular, an intervention can change subsequent states, actions, and intervention opportunities, so its effect also depends on how later interventions are assigned. Neither observed benchmark trajectories nor data from trajectory-level randomized experiments (see, e.g., [1, 7, 19]) fully resolve these questions. While analyses of observed benchmark trajectories can reveal potential intervention points, they cannot by themselves identify the causal effects of intervening at those points.

In this paper, we develop a methodologically grounded framework for the causal evaluation of interventions in agentic AI. We show that conducting random interventions in a single trajectory can support the estimation of multiple causal estimands at different points during task execution. Building on the framework of micro-randomized trials [14], we randomize intervention assignments at each eligible decision within a trajectory. At each eligible decision point, the experimental harness records the agent's proposed action and observed history, randomly assigns intervention or control, and allows the agent to continue interacting with the environment (Figure 1).

Despite its simplicity, this experimental design generates data that support causal evaluation of intervention policies beyond the randomized policy. Under standard causal identification assumptions (discussed in Section 2.4), the data identify the causal effects of a rich class of intervention policies that depend on observable history. The same data also support comparisons across groups of intervention points defined by pre-assignment information, such as tool-call types, task stages, or patterns of prior failures. This analysis does not require access to the agent's internal state or a Markovian model of its interactions with the environment. It only requires black-box input-output access to the AI agent.

We introduce three causal estimands to address different causal questions about interventions during agent execution, each with a corresponding estimation method:

  • Blip with randomized continuation: The causal effect of intervening at a particular decision when future interventions continue to be randomized. We estimate this effect using cross-fitted augmented inverse probability weighting (AIPW) with known assignment probabilities.

  • Blip with no-treatment continuation: The causal effect of intervening at a particular decision when no further interventions are applied for the remainder of the trajectory. We estimate this effect using structural nested mean models (SNMMs) and g-estimation [15, 24, 28].

  • Policy gain (off-policy evaluation): The causal effect of applying a target policy that intervenes based on the agent's observed history, relative to never intervening throughout the trajectory. We estimate this gain using continuation-specific SNMMs and g-estimation.

These estimands are formally defined in Section 2.3, with the first two measuring blip effects under different continuation policies and the third evaluating the gain of a target intervention policy through off-policy evaluation. Estimating the latter two effects using our SNMM approach requires additional assumptions on the specification of the blip-effect models beyond experimental randomization.

Figure

Figure 1: Sequential randomization in τ\tau-bench Retail. Panel (a) assigns each eligible tool proposal to direct execution (At=0A_t=0) or review (At=1A_t=1); panel (b) shows the corresponding causal diagram, where XX is the task, LtL_t is the current observed information, YY is terminal success, and UU is unobserved agent state.

These blip effect estimands can also be useful as attribution tools, attributing risk or success to specific decisions in a trajectory. For example, if an agent fails to complete a task, the blip effect of intervening at a particular decision can indicate whether that decision was a key contributor to the failure. Conversely, if an agent succeeds, the blip effect can reveal whether intervening at a certain point would have improved the outcome even further. This attribution perspective can help users understand which decisions are most critical for task success or failure, guiding future interventions and policy design. These attribution effects can be estimated for individual decisions or averaged over groups of similar decisions, providing insights into the causal impact of specific actions within the agent's trajectory. At various levels of granularity, these blip effects can be reported to users in the form of a "decision impact score," leaderboard, which quantifies the expected change in terminal outcome if an intervention were applied at that group of agentic decision. This score can help users prioritize interventions and understand the causal dynamics of the agent's behavior.

We apply our framework to tool-call review in τ\tau-bench Retail [3, 30] and ToolSandbox [18], and to adversarial feedback in ImpossibleBench [32]. In τ\tau-bench Retail, we estimate positive effects of tool-call review on task success for several order-handling groups. In ToolSandbox, the estimated effects of tool-call review vary across capabilities and agents. In ImpossibleBench, we estimate an increased probability of prohibited test edits following adversarial feedback in particular agent states, including near-completion states with contradictory tests. Across all three benchmarks, our experiments show how randomized interventions can identify decisions where tool-call reviews may improve or harm task performance, as well as states where adversarial feedback may increase safety violations.

More broadly, our work shifts the focus of agent evaluation beyond static benchmark assessments toward the decisions users face during deployment: not only whether an agent succeeds or fails, but also whether intervening at a particular point would change the outcome. This perspective opens up a broader research agenda at the intersection of causal inference and agentic evaluation, with the long-term goal of enabling the reliable and safe deployment of agentic AI systems in the real world.

Related work. Agent evaluation and intervention-based analysis. Existing benchmarks evaluate agent capabilities and safety across various interactive tasks [10, 18, 30, 32]. Recent work extends these evaluations through trajectory-level failure analysis [8, 31] and intervention-based diagnosis using counterfactual replay or targeted re-execution [5, 20, 25, 29]. Our paper complements these approaches by estimating the causal effects of interventions across different agent actions and states using randomized trajectories, without requiring counterfactual replay.

Randomized evaluation of AI agents. Recent studies have used randomized controlled trials (RCTs) to evaluate AI systems by comparing different agent configurations, assistance systems, and interactive environments [1, 7, 19]. These experiments primarily evaluate the effects of treatments assigned at the task or trajectory level. In contrast, we randomize interventions at intermediate decision points, enabling causal evaluation of individual interventions and history-dependent intervention policies from the same experimental data.

Sequential causal inference and policy evaluation. Our framework builds on micro-randomized trials and distal causal excursion effects, which study the effects of repeated interventions as the observed context evolves [6, 14, 23]. Our work is also closely related to dynamic treatment regimes and off-policy evaluation, which study the causal effects of sequential intervention policies [12, 21, 27]. We use augmented inverse probability weighting and structural nested mean models with g-estimation [15, 24, 28] to estimate intervention effects and evaluate intervention policies.

References (29)