Skip to content

TwinCheck: Evidence-Grounded Negative-Twin Verification for Stateful Tool Agents

Jiaxuan Dai, Tianyi Huang

cs.AI

Abstract

A single locally plausible tool call can derail an otherwise successful agent trajectory. Suspicion alone does not justify intervention, because the replacement itself can introduce the very failure verification is meant to prevent. We introduce TwinCheck, an inference-time verification policy that considers replacement only when the trace satisfies an evidence condition tied to a local failure hypothesis. It constructs a trace-grounded counterfactual alternative, a negative twin, and replaces the actor's proposal only if the twin passes structural checks and the pairwise verifier prefers it in both candidate orders. For paired evaluation, exact replay holds the actor's parsed responses and actions fixed until the first accepted replacement, separating intervention effects from resampling. On 159 primary BFCL V4 multi-turn tasks, the complete policy raises GPT-5.6 Sol task success from 45.3% to 58.5%, a gain of 13.2 percentage points (95% task-bootstrap CI [8.2, 18.8]), with 21 rescues and no observed success-to-failure regressions. Across the completed primary set and a conditional extension, all 37 rescues follow the same inverse-action repair pattern. The verifier accepts every constructed candidate and adds no filtering on these trajectories. TwinCheck frames execution-boundary repair as a constrained comparison, making the proposed replacement itself the object of verification.

Create a lesson

Metadata

Comments
Accepted at the NeurIPS 2026 Workshop Who Verifies the Agents? Toward Reliable Agent Development; Accepted at the NeurIPS 2026 Third Workshop on Agents in the Wild: Safety, Security, and Beyond