Your agent runs its code in a sandbox and can still overwrite the decision log.
Here is a run trace. It is a demonstration, not an incident; you could reproduce it yourself.
An agent gets a small task, some cleanup work over a shared store. It writes a short script and sends the script off to run. The script executes in an isolated sandbox. Its last call goes out over the API and edits an existing record, the team's decision log entry, and the script exits clean. The trace shows that edit as a proposal. Held, not applied. The record sits unchanged until a person opens the proposal and accepts it.
Run the same script again. Same sandbox, same clean exit. One change: the last call creates a new record instead of editing one. This time the write lands immediately. Nothing was holding it.
The sandbox line in the trace is identical in both runs. Same environment, same isolation, same exit. The difference had nothing to do with the sandbox.
That sameness is the point. A sandbox decides where an agent's code runs, not whether the write that code issues lands. A sandboxed agent's blast radius is set by its write path, and what shrinks it at the write itself is a separate control that holds the write until a human accepts it.
What a code sandbox actually contains
A sandbox contains where an agent's generated code runs: agent code runs in an isolated sandbox (E2B), set apart from your machines and your data. It is an execution environment with a wall around it, and the wall is real.
What the wall buys is worth conceding in full. If the generated script hangs, it hangs in a place built to absorb hangs. If it does something dumb, it does it in a disposable environment. You did not hand the agent a shell on your laptop; you handed it a room with nothing in it. That is a genuine control, and if you are running agent-generated code today you should have one. We run ours inside a sandbox too, and I would not run it any other way.
What a sandbox does not cover: a write to durable state
The last line of the trace is the one that matters. The script issued a write that reached the record, then exited clean. Sandboxed code with a write path can still change durable state. The sandbox governs execution. The write leaves the sandbox as an API call the sandbox was always allowed to make, and it lands wherever that call's permissions allow it to land.
"Sandboxed" is a claim about where code ran. Whether the record changed is a separate question, and the sandbox does not answer it. The trace does. In the second run, the answer was a new record nobody had accepted, landing immediately.
The pattern I keep seeing goes like this. A team wires up isolated execution for agent code, watches a few runs go clean, and quietly upgrades its posture from "we watch what the agents do" to "it is sandboxed, let it run." The word starts doing work it was never built for. The sandbox was answering where. The team hears safe. Later an agent write lands in a record nobody accepted, and the confusion is genuine, because the sandbox said the run was fine. The sandbox was telling the truth. It was never asked about the write.
The write gate: a consequential write held as a proposal until a human accepts it
A server-enforced approval gate holds a consequential write as a proposal, and the write never lands until a human accepts it. The hold is pre-application, so it happens before the write applies, and it is enforced at the data layer, outside the agent's loop, with three independent enforcement layers behind it. The agent proposes, a person accepts, and until then the write never lands. This is the mechanism holding the edit in the first run of the trace above.
I want to be exact about where it stops, because the second run is our system too. The automatic gate covers edits to existing records, the rewrite and patch paths. Creation is not gated. Metadata writes are not gated. And the gate depends on autoAccept being off, which is a setting, and a setting is a thing a person can flip. The create in the second run landed immediately because nothing was holding it. That is our published failure path, not a bug report we are waiting on someone to file.
Two different controls doing two different jobs
A sandbox isolates where code runs; a write gate decides whether a write to durable state lands. A code sandbox does not govern whether a write to durable state lands, and a gate does not care where the code that issued the write ran. They are two controls answering different questions.
| Control | The question it answers | The question it leaves open | |---|---|---| | A code sandbox | Where did this code run? | Did the write it issued land unreviewed? | | A write gate | Does this write land without a human accepting it? | What happened inside execution? |
The teams I see usually hold the first control and believe it covers the second. It does not. Neither control substitutes for the other, which is the uncomfortable part: one purchase does not settle the problem.
There is a fair objection, and it deserves a straight answer. Scope the credential and you do not need a gate: give the sandboxed process a read-only token, or a token confined to scratch space, and the write path is closed at the source. That is correct, it is cheap, and you should do it. Credential scoping is a real control.
Here is its boundary. Your agent exists to change the record sometimes; that is the job. A token that can never write anything is a token that cannot do the job. A token that can write the record cannot tell a good edit from a bad one. Scoping decides which records are reachable. It does not put a person between the agent and the one write that matters. Scope the credential, and keep a gate on the writes that still have to go through.
Where each control stops
You already know the objection to our own gate, because it has been riding along since the section above: it does not cover creates, so it does not solve this problem either. Correct. A control you have to oversell is a control you cannot trust at the moment a write is sitting there waiting.
So the operational change, if the thesis holds, is this. For each agent you run, split your review into two questions and demand an answer to both. Where does its code run. Which of its writes land without a person looking. If you can only answer the first, you have a sandbox, the second question is still open, and you will find that out the way the pattern teams do.
This is what we built to hold the write a sandbox cannot see. Synthweave is the shared store this trace runs on, a store people and agents both write to, and the held proposal in the trace is a write to that store. The gate covers edits to existing records; the limits above are the limits. I would rather you learn the line from this page than from a trace you did not expect.
Go back to the two runs. Identical sandbox line, identical clean exit. One write held, one write landed, and nothing in the execution log tells you which is which.
Run both traces yourself. The second one is the one worth running. And for each agent you run: which writes would land if no one was looking?