Policy-Constrained Causal Repair for Tool-Using Agents

Vikash Singh, Debargha Ganguly, Weicong Chen, Aman Goel, Yanyan Zhang, Mohsen Hariri, Sreehari Sankar, Chaoda Song, Yuting Shao, Alexander Nemecek, Osama Zafar, Kai Ye, Biyao Zhang, Xinpeng Li, Shouren Wang, Wang Yang, Erman Ayday, Jing Ma, Vipin ChaudharyarXiv 2026

TL;DR

An AI agent can follow every written rule and still cause real-world harm—for instance, double-charging a customer when retrying a timed-out payment. Policy-Constrained Causal Repair shifts agent guardrails from filtering isolated tool calls to certifying and enforcing multi-step recovery plans. By using randomized logs to bound the downstream risk of all candidate plans simultaneously and locking in the safest minimal edit at runtime, it eliminates post-selection safety failures and multi-turn deviations.

What Problem Does This Paper Address?

Today’s LLM agent guardrails—whether classifiers, policy checkers, or privilege monitors—are myopic: they inspect each proposed tool call in isolation and decide whether to allow or block it. In sequential decision-making, this single-step view breaks down in three ways:

  1. Hidden environment state: Whether a compliant call causes harm often depends on unobserved state. If a payment gateway times out, retrying the payment obeys every static rule, yet it will double-charge the customer if the first attempt silently succeeded.
  2. High-risk "nearest" fixes: Blocking the retry leaves the order unpaid, while the smallest compliant edit (e.g., adding an idempotency key) may still carry a 12% double-charge risk if the gateway only honors keys 60% of the time. Resolving this safely requires a multi-step plan: check the ledger first, and retry only if no charge is found.
  3. Multi-turn deviation: Approving a safe first step does not guarantee safety if an erratic or adversarial agent can use that approved step to reach a state where its next call causes harm.
Figure 1. Same policy check, different futures. An agent retries a timed-out payment. A policy guard allows the nearest fix, a retry with an idempotency key. Causal repair returns a certified plan (check the status; retry with a key only if no charge is found) and locks it in. Ribbons: exact probabilities in one instance (first attempt went through, 0.3; keys honoured, 0.6; status checks right, 0.8). The nearest fix charges twice with probability 0.12, above the limit of 0.05; causal repair, 0.024.

Methods

The authors formulate guardrailing as minimal-edit causal repair over repair contracts—multi-step plans pairing an immediate action with a conditional continuation rule (a compact decision tree branching on tool outputs, timeouts, and errors).

Figure 2. How causal repair decides. (1) Candidate plans, ordered by edit cost. (2) The policy removes plans that break a rule on any branch. (3) Randomized logs bound every plan’s risk simultaneously; the guard picks the closest plan below the limit r (⋆). (4) The plan is locked in: its risk budget is split across branches (at most r on average), and calls outside the plan are blocked.

The framework operates in four stages:

  • Policy filtering & ranking: A trusted monitor discards any contract that could violate formal policy on any branch, then ranks eligible plans by edit distance from the agent's original proposal.
  • Causal risk identification: Because ordinary logs suffer from hidden confounding (deployed guards intervene based on state), the authors collect logs where the guard randomizes its intervention after seeing the agent's proposal. This enables exact causal risk estimation via the longitudinal g-formula.
  • Selection-valid simultaneous bounds: Searching over a menu of plans introduces post-selection bias—systematically picking candidates whose risk was underestimated by chance. To prevent this, the guard bounds all reachable transition kernels simultaneously using robust interval-MDP recursion (with exact Clopper–Pearson intervals), assigning each plan a verdict: certified, exceeds, or unresolved.
  • Runtime enforcement: To ensure the agent doesn't abandon the plan mid-execution, the runtime core either locks in committed contracts (executing the continuation rule directly) or passes inherited risk budgets down branches for flexible replanning, enforced via signed execution permits. For large open-ended benchmarks, the authors also provide a scalable Fitted-Q policy-iteration mode over compact feature strata.

Datasets

The paper evaluates across both exact causal environments and open-ended public benchmarks:

  • Exact environments: A two-stage causal model, a service-recovery sandbox (12 contexts, 7 restart contracts), and a newly introduced 1,500-instance Consequence Suite spanning payment retry, order refund, and service recovery (500 instances each) where policy-compliant repairs carry distinct downstream risks. Five Qwen agents (Qwen3.5 0.8B, 2B, 4B, 9B; Qwen3.8 27B) act directly in these tasks.
  • Public benchmarks: $\tau^2$-bench (airline, retail, telecom—plus a modified version with injected ambiguous timeouts), DTap, AgentDojo, and AgentDyn, partitioned into collection tasks for fitting the guard and held-out test tasks.

Key Insights and Ideas

  • Single-call approvals cannot stop multi-turn risk: Evaluating risk only on the initial call—or resetting the risk budget at each step—allows risk to accumulate over turns, breaking safety promises against adversarial agents. Enforcing the full plan or tracking inherited risk budgets is essential.
  • Point estimates fail under selection: Standard plug-in estimators and even simultaneous bootstrap bands frequently certify unsafe plans because choosing the best-looking option from a menu exploits random underestimation.
  • Current benchmarks saturate at static policy: By randomizing compliant repairs across four public benchmarks, the authors show that existing suites expose very little risk variation at blocked calls. The real frontier for consequence-aware safety lies in permitted calls under state uncertainty (such as ambiguous timeouts).

Key Results

  • 0% false certification: Across exact environments, simultaneous certificates achieved a 0% false-certification rate at every sample size (compared to 58–99% for plug-in estimates and up to 30% for bootstrap bands).
  • Plan enforcement prevents violations: Runtime plan enforcement prevented the $3.7\times$–$7\times$ risk violations seen under single-call approvals.
  • Consequence Suite: Causal repair slashed harm from 0.227 to 0.014 while increasing safe completion by $+0.037$. Across the five Qwen agents, it kept harm $\le 0.022$ (versus 0.07–0.23 for the nearest compliant repair).
  • $\tau^2$-bench with ambiguous timeouts: On 600 paired held-out telecom episodes across five agents, certified plans eliminated all 56 duplicate-write harms caused by blind retries and raised safe completion from 72.8% to 80.7%.

Limitations and Future Work

The formal guarantees assume finite reachable histories, stationary logs (or a faithful simulator), and complete runtime mediation. Under environment drift or omitted state, tighter intervals can become overconfident unless proactive robustness margins are added. Additionally, formal checkers only enforce the exact predicates implemented (3.0–4.4% of passed $\tau^2$-bench writes still lacked full semantic consent), binary harm weights unequal financial losses equally, committed contracts trade agent autonomy for guaranteed follow-through, and closed-loop experiments used Qwen models with thinking disabled. Future work includes automated contract synthesis, cost-weighted harm, cross-family reasoning agents, and distributionally robust certificates.

Summary updated

BibTeX
@misc{singh2026policy,
  author = {Vikash Singh and Debargha Ganguly and Weicong Chen and Aman Goel and Yanyan Zhang and Mohsen Hariri and Sreehari Sankar and Chaoda Song and Yuting Shao and Alexander Nemecek and Osama Zafar and Kai Ye and Biyao Zhang and Xinpeng Li and Shouren Wang and Wang Yang and Erman Ayday and Jing Ma and Vipin Chaudhary},
  title = {{Policy-Constrained Causal Repair for Tool-Using Agents}},
  year = {2026},
  eprint = {2612.00565},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2612.00565},
}
Figure