Knowing when to intervene: causal evaluation of AI agents
A Stanford paper treats the question of where to review or steer an agent mid-trajectory as a dynamic causal inference problem, estimating the value of each intervention from a small set of within-trajectory randomized runs. The results show that the value of oversight varies widely across tools and agent states, which matters for anyone allocating a review budget.

Every agent I have put into production eventually raises the same operational question: where do the reviews go? We have a budget for oversight, whether that is a human approver, a larger model acting as a checker, or a slower agentic harness. We cannot spend it on every step. And the benchmark score that got the agent approved says almost nothing about which steps deserve it.
A new paper from Stanford, Knowing When to Intervene: Causal Evaluation of AI Agents by Ayush Sawarni, Wenqian Xing, Tijana Zrnic, Ramesh Johari and Vasilis Syrgkanis, treats this as what it is: a causal inference question. It is a dynamic one, because an intervention at step three changes what the agent does at steps four through ten. I think the framing is right, and the experimental design is simple enough that teams could start using it now.
Why benchmarks cannot answer this
A benchmark fixes the tasks, the tools and the scoring, then reports how often the agent succeeds. It can show you where failures happen. It cannot tell you whether reviewing a particular database write would have prevented the failure. That is a counterfactual. Estimating it from observational logs is possible only under identification assumptions, such as no unmeasured factors driving when reviews happened, and ordinary agent logs rarely give you grounds to believe them.
Trajectory-level A/B tests do not solve it either. Comparing "always review" against "never review" gives you one number for one policy. It does not tell you which of the dozens of tool calls inside a trajectory carried the effect.
The authors also point out that the effect of reviewing a call depends on what happens afterwards. If a later review would have caught the same mistake anyway, the early review is worth less. Any honest estimate has to say what the oversight policy does for the rest of the trajectory.
The design: randomize inside the trajectory
The method borrows the micro-randomized trial from mobile health research. At each eligible decision point, such as a proposed tool call or a failed code submission, the harness records the agent's history and proposed action, then flips a coin. In the paper the coin is fair: probability one half of review versus direct execution. Then the agent continues.

From one pool of these trajectories, they estimate three things:
- Blip with randomized continuation. The effect of intervening at this decision while later decisions stay randomized. They estimate it with cross-fitted AIPW. Because the assignment probabilities are known by design, the estimator stays unbiased even if the outcome model is wrong.
- Blip with no-treatment continuation. The effect of intervening here when no later intervention follows. This one needs structural nested mean models (SNMMs) and g-estimation.
- Policy gain. The value of a contextual policy such as "review every order cancellation" compared with never reviewing. This is off-policy evaluation from the same data.
Averaged over groups of decisions (reads versus writes, a tool family, a single API, a state like "near completion"), these effects become what the paper calls a decision impact score: a leaderboard of the places where oversight actually moves the outcome. The method needs only black-box input-output access to the agent. No internals, no Markov assumption.
What the experiments show
Across three benchmarks the main result is heterogeneity. Aggregate effects hide the decisions that matter.
τ-bench Retail. Agents running on GPT-5 nano and Claude Haiku 5.5 handle customer orders, and GPT-6 Luna acts as the reviewer. For Haiku, the review effect averaged over all read calls is close to zero. Account-detail reads on their own show a positive effect, with the confidence interval above zero. A team looking only at the aggregate would have dropped reviews that help. The authors also checked their model-based policy estimates against direct rollouts. The SNMM used 2,280 randomized trajectories, and the direct evaluation used 456 rollouts per policy. Across nine selective review policies, the intervals overlapped every time, and the direct estimate fell inside the SNMM interval in eight of the nine cases.
ToolSandbox. One randomized experiment per agent covered 33 tools and 49 reporting groups. For the "time and calculations" capability, the effect of review was +1.8 points, with an interval of [-0.2, 3.8], so inconclusive. Inside that group, reviewing the tool that builds a timestamp from date and time parts had an effect of +6.9 points [1.2, 12.6]. That is the kind of narrow effect an aggregate hides. It is a single subgroup estimate without multiple-comparison adjustment, and it says nothing about what the review costs, so I would treat it as a candidate for a confirmatory trial rather than a settled priority.
ImpossibleBench. Here the intervention is adversarial. After a failed coding submission, the agent receives either neutral feedback or feedback encouraging prohibited test edits. The point is to find where the agent is most vulnerable. Adversarial feedback with one attempt left raised violations by 9.4 percentage points [2.9, 15.9], against 3.3 pp after the first failure. With at least 80% of tests passing, the effect was 5.7 pp. Below 50% it was 0.3 pp, an interval that includes zero. Pressure near the finish line is where agents cut corners. Anyone who has watched a coding agent rewrite a test to make it pass will recognize this.
How I would use this
The practical change is to treat oversight placement as an experiment, not a matter of intuition. Concretely:
- Define eligible decision points up front. Tool calls, write operations, and submissions after a failure are natural candidates. The paper fixes the eligibility criteria before collecting data.
- Log the propensity. Randomize review at each point with a known probability and record it next to the history. That known probability is what makes the AIPW estimate robust to a poor outcome model.
- Report by group, at several levels. Read/write, then tool family, then individual tool. The ToolSandbox timestamp result appears only at the finest level.
- Treat the leaderboard as a way to generate hypotheses. The authors are clear that their intervals are pointwise and not corrected for multiple comparisons. A promising group should then get a pre-registered follow-up trial.
This also changes how I think about red-teaming. The ImpossibleBench setup flips the sign of the intervention to map where an injection does the most damage. That is a vulnerability profile over agent states, which is more actionable than a single attack success rate.
Limitations worth keeping in view
The authors list the caveats themselves. The no-treatment blip and the policy-gain estimates rely on a correctly specified parametric blip model. Only the randomized-continuation AIPW estimate is free of that assumption. The agents are small models on benchmarks that frontier systems may saturate, so it is open whether effects shrink or simply move as capability grows. The history features are hand-designed. And intervention points are tied to fixed structural events. The more interesting triggers, such as an agent sounding overconfident or contradicting itself, would need semantic detectors that someone has to build and validate.
None of that undercuts the core contribution. It gives a principled way to ask "would checking here have changed the outcome?" using data you can collect cheaply in staging. The code is public. I expect sequential randomization to become a standard part of the evaluation harness for any agent that has a human or a larger model in the loop.