Reproducing Production Bugs in Agent Sandbox Environments
Agents can't fix bugs they can't reproduce, and most sandboxes don't.

A coding agent asked to fix a production bug does not simply read a stack trace and propose a patch. It opens files, runs shell commands, installs packages, and executes test suites, often dozens of times, before a human ever looks at the resulting diff. A human developer reproducing the same bug locally carries context that never gets written down: which service is actually running, which database version is live, which background worker touches the code path in question. An agent has none of that. It only sees what the sandbox contains, and if the sandbox doesn't contain the right things, the agent will still produce a confident-looking fix. Most agent sandboxes are built to keep the agent from damaging production, not to make the agent's environment resemble production, and those are two separate engineering problems that get solved separately or not at all. The failure mode that results is quiet: the agent works against the wrong environment, the fix passes every test inside that environment, and the bug is still live in production with no error thrown and no alarm raised.
What "sandbox fidelity" means
Isolation and fidelity answer different questions, and conflating them is where most of this trouble starts. Isolation asks whether the agent can affect anything outside its boundary. Fidelity asks whether the inside of that boundary matches the conditions that were present in production when the bug occurred. Most sandbox infrastructure on the market answers the first question carefully and leaves the second to chance.
Fidelity breaks down into four concrete dimensions. Dependencies means the exact package versions, runtime versions, and installed tooling, not merely versions that are compatible with what production runs. Data shape means a database seeded with the schema, data types, and relational structure present when the failing row or event occurred, not a clean fixture set built for happy-path tests that never resembled the production data that broke. Filesystem and process state covers the configuration files, environment variables, and process topology the code expects to find, including credentials, feature flags, and sidecar processes. Leaving any of these out means the agent is reproducing a bug that resembles the real one without actually being it.
What ties all four together is reproducibility: the same inputs should produce the same starting conditions every time a sandbox is instantiated. Fidelity is what makes that reproducibility useful for bug work specifically, because a perfectly repeatable environment that doesn't match production will just repeatably fail to reproduce the bug.

Sandbox default settings of major coding agents
The sandboxing built into today's leading coding agents exists to contain the agent, not to recreate production, and that design choice leaves the fidelity work to the engineering team every time. As of 2026, the landscape looks uneven by design. OpenAI's Codex CLI stands out as the exception that ships sandboxed by default, combining Bubblewrap, Landlock, and seccomp on Linux. AWS Kiro isolates its cloud-based autonomous agent sessions by default, while its IDE and CLI modes run locally with no sandboxing.
A pattern falls out of that list. Either way, no shipping tool supplies the fidelity layer automatically. That work belongs to the engineering team regardless of which agent sits at the front end of the workflow.
How isolation technology choice shapes fidelity
The isolation technology underneath a sandbox sets a hard ceiling on how much of production can be faithfully rebuilt inside it, and not every option can hold the full stack a real bug reproduction needs. MicroVMs, Firecracker and Kata Containers among them, give each sandbox a dedicated guest kernel and hardware-level isolation, and they can host a full Linux environment complete with background processes, mounted filesystems, database engines, and network services running at once. The fidelity ceiling there is close to that of a real machine. Language-level isolates such as V8 or WebAssembly start fast but have no real filesystem or process model, which makes them fine for running isolated code snippets and a poor fit for reproducing bugs that depend on services, databases, or process state.
The question that actually matters for bug reproduction is narrower than a general security comparison: can the sandbox run a database, a background worker, and a network service at the same time while an agent interacts with all three? MicroVMs answer yes without qualification, and containers answer yes in most cases. Everything lighter than that trades fidelity for speed, and that trade is fine for some tasks and disqualifying for others.
The pre-loaded sandbox: what has to be in place before the agent sees the bug report
A high-fidelity sandbox is not something an agent assembles on the fly. It has to exist, fully configured, before the agent ever reads the ticket, since the agent can only work with conditions it was actually handed. Getting there is a sequence of decisions, made in order, long before the bug report arrives.
Dependencies come first, and they need to be pinned and pre-installed rather than resolved at the moment the agent starts working. Data shape has to match the failure state specifically: the database needs to be seeded with the schema and the data that reflects the actual row or event that triggered the bug, not a clean fixture set written for happy-path testing. This is the step most often skipped, and skipping it is the single most common reason a "reproduced" bug doesn't actually reproduce anything. Configuration has to match too: feature flags, connection strings, and any setting that changes behavior between environments need to be set explicitly to their production values.
Once all of that is correct, the environment needs to be snapshotted. A snapshot captures disk state so that every subsequent agent run can start from the same known point without re-running the setup from scratch, which is what turns a one-time reproduction into a repeatable one. Lifecycle discipline closes the loop. Each sandbox should be scoped to a single bug task with a hard time-to-live, because an agent running indefinitely against a long-lived environment will accumulate state that drifts further from the original reproduction conditions with every passing hour.
The bug report as part of the environment
Even a correctly built sandbox fails at reproduction if the ticket handed to the agent doesn't specify which conditions it should recreate. The bug report is the only window an agent has into what the environment is supposed to look like at the moment of failure. Agents read ticket bodies as instructions, and a vague one, "authentication is broken," for instance, gives an agent no way to know which service state, which data, or which code path to exercise. Left without that information, the agent will guess, and its guess may not match the production conditions baked into the snapshot.
A ticket that actually serves agent reproduction states the specific endpoint or function involved, the input that triggered the failure, the expected output against the actual one, and any environment detail that matters, such as which worker was running or which feature flag was active. The pipeline that carries a bug report from an issue tracker to an agent and back as a pull request has become the main channel for delegating this work, and that channel is only as good as the structured information passing through it. Keeping the human as assignee and the agent as contributor matters here, because it keeps a person responsible for confirming the sandbox conditions were right, in addition to confirming the diff compiles.
The Wasmtime team's multi-agent bug-finding sprint as environment precondition
The Wasmtime team's 2026 security sprint shows what happens when the environment an agent works against is treated as part of the engineering plan. In April 2026, Wasmtime, built through collaboration between Bytecode Alliance members Mozilla, UCSD, Akamai, and F5, ran a three-week sprint using a multi-agent harness built specifically to find security vulnerabilities in the Wasmtime codebase.
That harness had two distinct parts. The other validated potential bugs by reproducing proof-of-concept exploits and test vectors against them, with that reproduction step built directly into the harness. The sprint produced the largest batch of security advisories Wasmtime has ever published at one time, triple the total published across all of 2025 and double the number of Critical-severity advisories in the project's history. Eleven of the twelve advisories came from the LLM-based tools.
The scoping decision behind that result matters as much as the headcount of advisories. Rather than pointing the harness at the entire codebase without direction, the team focused it on the most security-sensitive regions: native code generation in the Cranelift and Winch engines, and the unsafe Rust inside the runtime. That's the environment-as-precondition argument applied directly to code analysis: give the system a targeted execution context, specific modules, specific architectures, specific threat models, and it returns verifiable findings.

Customer.io's agent-driven bug week and the gap between delegation and reproduction
Customer.io ran a different kind of test, and it points at the same underlying constraint from the workflow side. During the week of May 4 through 8, 2026, Customer.io's engineering team ran a sprint built around one rule: engineers could not fix bugs themselves, and agents had to. The team routed work through Linear, which received bug reports and sent them to Devin by way of an orchestrating agent called Baloo, built on Claude, a working example of the issue-tracker-to-agent pipeline in production use.
What the agents absorbed was the stretch of work between noticing a problem and having a credible fix sitting in review, not the initial diagnosis and not the final decision to merge, but everything in between. At that volume, the reviewer's job changes shape. Instead of reading for code style and logic alone, the reviewer has to confirm that the sandbox each agent worked in actually reflected the production conditions tied to that specific bug. Doing that kind of validation across 217 closed tickets in five days is only realistic if environment configuration is already built into the ticket workflow. Speed without that discipline just means more fixes generated against the wrong starting conditions, faster.
Running cloud agents for bug reproduction in environments that match production
The fix for the fidelity gap sits at the infrastructure level: running bug reproduction agents inside cloud-hosted, isolated virtual machines that are pre-loaded with the team's actual dependencies and tooling, rather than asking each engineer to hand-configure a matching environment before handing a bug off to an agent. When every agent run gets its own sandboxed VM, the starting state is something the team controls directly, not something inherited from whatever happens to be sitting on a developer's laptop that week. A cloud agent platform like Replicas pre-loads each task's isolated VM with the team's codebase, dependencies, and tooling before the agent ever runs, so the agent starts from a known baseline instead of whatever state the sandbox happened to carry in.
Pre-loading matters because it changes when the environment gets defined. An environment assembled on demand, piece by piece, as the agent runs, is a different thing from an environment that was snapshotted once, correctly, and started fresh for each task. Achieving fidelity across dependencies, services, data shape, and filesystem state requires exactly that kind of repeatable starting point, and platforms that run each agent task in a freshly configured Linux VM give teams direct control over what environment the agent inherits instead of treating fidelity as something bolted on after the fact.
Harness choice still matters inside that model. Different bugs call for different agents, and a platform that can route a ticket to Claude Code, Codex, Cursor, or Opencode depending on the task means a team isn't locked into one tool's sandboxing posture for every bug it needs reproduced. What comes back from a run like this is a pull request, not a suggestion: the agent works inside the configured environment, verifies its own fix, and returns something a reviewer can check rather than something that has to be rebuilt and re-tested by hand.
Environment fidelity as a first-class concern, operationally
Teams that actually close bugs with agents, rather than just collecting plausible-looking diffs, have made environment fidelity a standing decision baked into how they work, backed by a specific set of practices held in common across the team.
Maintain versioned environment definitions next to the codebase itself, the same way a lockfile pins dependency versions, recording the service versions, configuration values, and data shapes that define what production actually looks like at any given moment. Make the environment snapshot a required field on every bug ticket, right alongside the steps to reproduce, so the ticket tells the agent which starting conditions to use. Check the environment before reviewing the fix: the first question a reviewer asks should be whether the agent ran against the right starting conditions, because a fix that passes inside the wrong environment has not actually closed the bug. Scope every agent run to one task with a hard time-to-live, and destroy the sandbox once it finishes, since reusing sandboxes across runs lets state accumulate in ways that quietly corrupt the next reproduction attempt.
Most of all, environment configuration works as a shared, versioned, team-wide discipline rather than something each engineer reinvents whenever a ticket lands on their desk. The argument running through all of this is that environment fidelity is a design decision made in advance, not a configuration detail fixed in the moment a bug shows up. Teams that treat it that way are the ones whose agents close bugs. The ones that don't are the ones still wondering why the fix that passed every test in the sandbox never actually fixed anything in production.


