Why Agent Eval Suites Drift and How Simulator State Ownership Stops the Bleed
Simulators that own resource state keep agent tests honest.

Integration testing against stateful APIs needs a simulator that owns resource state across calls, resets it before each test, and is checked against the real API on an ongoing basis. This lets tests check the order of operations without hitting production. Agent eval suites drift when their assumed environment stops matching the live one. Simulator state ownership makes that gap explicit and controllable.
Why eval suites measure a world that no longer exists
At 3 am, the eval suite is green, but the production agent is broken. The apparent contradiction comes from what the suite measures. An eval set is a frozen hypothesis about which tools behave how, what schemas they return, and what state exists at the first step. Production changes independently of that hypothesis. An API can change its schema, error codes, or rate-limit headers while the eval continues returning yesterday’s payload.
Six drift modes widen this gap on different timescales. They are dataset drift, tool-API drift, prompt drift, retrieval-corpus drift, user-distribution drift, and agent-step compounding. Tool-API and prompt drift can happen overnight, while dataset and user-distribution drift build up over days. Retrieval-corpus drift can go unnoticed until a re-index. Agent-step compounding introduces a different problem because errors accumulate through a sequence of decisions that a single-turn rubric cannot assess.
The agent itself need not change at all. Its effective behavior depends on its model and prompt as well as the tools and environment through which it acts. Once those dependencies diverge from the eval’s assumptions, the test and the customer are interacting with different systems. A passing score then describes an environment that production has already left behind.
Tool-API drift is the fastest and least visible of the six drift modes
Tool-API drift can arrive without leaving a trace in CI. An external service may add a required field, deprecate an endpoint, or change an error code while the agent keeps calling the old signature. A stateless mock still accepts the expected request and returns the expected body. Nothing inside that test requires it to notice that the real contract has changed.
Production exposes the mismatch through behavior before a final-answer rubric necessarily catches it. Tool-call latency rises, retries increase, and cost-per-success climbs even when the response still appears acceptable. Scoring tool-call success separately on live spans can place the failure next to the affected response in the trace tree. That improves diagnosis, but it remains detection after execution.
Schema snapshots provide an earlier warning of contract changes. Recording tool schemas and diffing them on each CI run allows breaking changes to fail the build. Yet a schema diff cannot replay the agent’s multi-step behavior against the new contract. Detection establishes that the environment changed, but testing the consequences requires an environment capable of preserving what each preceding call did.
Why stateless mocks cannot hold multi-turn agent behavior together
An invoice workflow makes the limitation concrete and visible. If an agent creates an invoice, a later list call should include it. In a stateless mock, that happens only if the scenario author writes both outputs to agree. Each other path needs its own set of responses that agree with one another. A valid path that the author did not anticipate can therefore produce contradictory results.
Many APIs are not independent request-response functions because the second response depends on the first operation’s effect. A fixed response can report a resource as “captured” before capture has occurred. The test then accepts a sequence the real API would reject, measuring the consistency of its script rather than the agent’s handling of a resource lifecycle.
Long-lived environments can accumulate stale data across sessions, changing the conditions under which later tests run. Deterministic per-test reset is therefore a requirement, but reset only helps when the environment represents meaningful state in the first place. Final-output scoring cannot repair either gap because the failure may occur mid-execution. The missing capability is an environment that remembers each operation and makes that memory available to subsequent calls.
How to test stateful APIs through simulator state ownership
Simulator state ownership means the simulator holds and changes the world, while the eval harness selects its starting configuration. The runner does not have to script every later response. A resource can move from created to captured to refunded, with responses determined by its current state. Likewise, a created invoice persists within the session, contributes to account totals, and becomes available to later retrieval and list operations.
Cross-tool state linkage makes those changes visible throughout the workflow. AWS’s ToolSimulator within Strands Evals uses a share_state_id to connect tools that share a backend under a common state key. An update through one linked tool is then visible to a subsequent call through another. Separate simulator instances can maintain their own tool registries and state, allowing different setups to run without contaminating one another.
A live sandbox is stateful, but ownership remains external. Its behavior can change independently of the harness, reproducing the dependency that caused the original drift. An internally controlled simulator can instead be reset and re-seeded before each episode. Realistic seed data fills the agent’s world with enough data of different kinds to work with. Any remaining difference from production is then between a setup the team controls and how the API behaves now, with no need to leave assumptions hidden and undocumented in canned responses.
How teams have implemented simulator state ownership and what they found
Static mocks remain useful for straightforward, predictable scenarios, while shared state supports workflows whose later calls depend on earlier changes. The common key connects operations through their backend state.
Sierra Research’s τ-bench emulates dynamic conversations between a simulated user and an agent equipped with domain-specific tools and policy guidelines. Its successor, τ²-bench, introduces a dual-control environment in which both parties can change shared state. In the telecom domain, the user simulator has its own tools. Success is not judged by dialogue alone. One reward dimension compares the final database state with the expected state, and the final reward is 1.0 only if all active dimensions pass, with any failure yielding 0.0.
Surge AI’s EnterpriseBench Corecraft, published by Mehta et al. in 2026, extends stateful simulation to an operational customer support organization with multiple entity types and 23 unique tools. The tasks require multi-step, domain-specific work under expert-authored rubrics. Frontier models solve fewer than 30% of tasks when every criterion must be satisfied. Improvements on BFCL Parallel, τ²-Bench Retail, and Tool Decathlon (Pass@1) suggest that training in a high-fidelity stateful environment can transfer beyond its training distribution.
Intuit’s StuntDouble RFC approaches the same gap through existing mocking infrastructure. It proposes an optional, episode-scoped state layer so definitions used for unit tests can also support reliable multi-turn evaluations. This remains a proposal.
Fault injection as the second axis of simulator state ownership
Correct state transitions cover only the path where execution succeeds. Production APIs also deliver latency spikes, timeouts, rate limits, and malformed responses. A simulator that controls state must therefore control failures at the tool-call layer as well. For an agent, resilience includes choosing the right tool, passing the right parameters, and handling a failed call without losing track of work it has already done.
Useful fault classes include latency and jitter on a specific upstream, rate-limit responses (429s), dependency timeouts (503s), and malformed response bodies. Their placement within a sequence is consequential. A rate limit on the third call occurs in a different world from a rate limit before any operation succeeds. Earlier calls may already have changed resources, so recovery must be evaluated against that changed state.
The CAST framework, presented at ICSE-SEIP in April 2026, combines online traffic record-and-replay with mocking for fine-grained, application-level fault injection. Its lifecycle covers startup, fault injection, and recovery, targeting production-level fidelity. For agent evaluation, the relevant distinction is between interrupting traffic and assessing behavior after the interruption. Stateful fault injection supports the latter by retaining the world in which recovery occurs. Without that continuity, a test can check an error-handling response but cannot faithfully reproduce the consequences of the preceding operations.
Continuous verification as the mechanism that prevents simulator drift
A simulator built once and left unchanged can diverge from the real API just as a fixed mock does. It may keep resource lifecycles consistent within the simulator even as it models behavior the provider no longer supports. That produces a familiar outcome, with CI passing and production providing the first evidence that the test environment is wrong.
The simulator-owning team must therefore make verification a release gate. Verification checks how the simulator behaves against the real API’s current responses before every simulator release, instead of relying on checks made at setup or in occasional audits. Published fidelity scores quantify how closely simulated responses match real ones, providing a visible artifact of that comparison.
Schema snapshots remain useful within this broader verification process. They can flag breaking contract changes on each CI run and provide lead time for further testing. Behavioral verification checks whether the simulator still responds correctly through state-changing sequences, which a schema diff cannot show. These checks serve different purposes, so neither substitutes for the other. State ownership controls the test environment, while continuous verification keeps that controlled environment anchored to the API it represents.
Applying simulator state ownership to CI pipelines and RL environments
For teams applying this architecture in CI, the minimum is offline evaluation on every code change that touches agent logic, including prompt changes, tool additions, and model swaps. A stateful simulator replaces live third-party endpoints during those tests. That removes dependence on external availability, live rate limits, and third-party credentials from the test path. Controlled faults can still test those failures on purpose. The distinction is between a test failing because its environment happened to break and a test assessing the agent’s response to a specified failure.
Deterministic reset makes regressions reproducible from a known starting state. Realistic pre-seeded data then gives those tests enough variety to expose behavior that an empty sandbox would miss. A resettable but empty environment may be repeatable without being representative, while a realistic shared environment may become inconsistent as tests modify it. Simulator ownership allows the harness to control both the starting data and the isolation of each run.
Training environments need controllable state and horizontal scale across thousands of containers that operate independently of a live API. World-state rewards evaluate what the agent accomplished. A stateless mock cannot supply that reward because it has no resulting world state to inspect.
The practical criteria are persistent cross-call state, realistic seed data, deterministic reset, controlled faults, and verification before every simulator release. CI needs a reproducible environment in which regressions can be isolated. RL needs scalable episodes with trustworthy reward signals. Published fidelity scores show how far the simulator still is from the real API, so teams can inspect the difference before a production incident reveals it.


