INTERACTIVE AGENTS · COUNTERFACTUAL EVALUATION
State-Complete Replay: Validity Conditions for Counterfactual Evaluation of Interactive Agents
When does replay recover the counterfactual world an evaluator intends?
A matching transcript can conceal a different environment. Replay validity requires restoring the state that affects the intervention and its continuation, including tool, session, and latent user state.
Counterfactual evaluation changes an action and asks what would have happened. Replaying against the wrong hidden state can hide real improvements, create spurious ones, or change the selected intervention.
Approach
Define replay-equivalent state for the intervention being evaluated. Use state challenges and independent branch restoration, then document the relevant conditions in a Replay Validity Certificate.
Main result
Visible-only ReplayShop replay matched the visible branch in all 20 cells but recovered the wrong effect in three. Prefix re-execution and full checkpoint restoration recovered every reference effect. ToolSandbox ablations separately exposed the contributions of tool state and latent user state.

Which hidden state does replay need?
