The code that matters most in production this year is code no person wrote or read. Coding agents generate it and run it in one step, often from instructions they found on a web page, so the machine it runs on is the only security boundary that counts. Vercel says its public sandbox challenge turned up a zero-day in the Linux kernel's networking code that let a researcher run commands on the host.
To isolate agent code, run every task in its own microVM, block its network unless the job needs it, keep secrets outside the machine, and throw the machine away or roll it back when the run ends. This guide covers why agent code needs its own machine, the steps that isolate it, and how Solari sets those steps up for you.
Why Does Agent Code Need Its Own Machine?
Agent code needs its own machine because it is untrusted input that happens to be executable. A coding agent can be steered by prompt injection hidden in a README, an issue or a search result, and the code it writes then runs with whatever access its environment gives it.
The old answer was a container. Containers separate processes with Linux namespaces and cgroups, but every container on a host shares one kernel, so a single kernel bug reaches all of them.
A microVM adds a hypervisor and gives each workload a guest kernel of its own. The challenge shows both why that matters and where it stops: the flaw sat in the host kernel, which every microVM on that machine depends on. No single layer is enough, so you stack several and keep each one patched.
How Do You Isolate Untrusted Agent Code?
You isolate it by giving each run a machine of its own and removing everything the job does not need. These are the steps that hold up when the code turns hostile:
One machine per run. Start a fresh microVM for every task or every customer, and never let two customers' code share a kernel. A compromise then stays inside one run instead of spreading across your fleet.
Network off by default. Most generated code needs files and a runtime, not the internet. Blocking outbound traffic stops a script from sending your data out, which is the first thing malicious code tries.
Secrets outside the machine. Keep API keys, tokens and database passwords in your own control plane, and hand a credential only to the one command that needs it. Code that never sees a secret cannot leak it.
Short lives and clean rollbacks. Shut a machine down when it goes idle, and snapshot it before risky steps so you can go back. A machine that lives for minutes gives an attacker minutes.
Hard resource caps. Fix CPU and memory per machine so a runaway loop or a crypto miner hits a ceiling instead of your bill. Ask for the size you need and expect anything larger to be refused.
A record of what ran. Keep command logs and session recordings so a reviewer can see what the agent did after the fact. Leave recording off for any run that types a secret.
If you build the sandbox layer yourself, add one more rule: treat every value the machine reports back to your control plane as tenant input, never as fact.
What Role Does Solari Play?
Solari gives your agent isolated machines from one account and one API, with each of these steps available as a setting rather than a project. Your agent brings the code; Solari decides what that code can reach.

A microVM of your own by default. Every Solari sandbox is a dedicated microVM unless you choose otherwise, and you never share a VM with another organization. Solari sandboxes are ready in 90 ms, so a fresh machine for every task adds almost no wait.
Hardened mode for hostile code. Set isolation to hardened and the sandbox keeps its own microVM with all outbound network blocked. Use it for code from strangers, from scraped pages or from any agent you would not trust with your data.
Credentials that stay off the machine. When your agent pushes or pulls with Git, Solari passes the token as environment variables of that one command, never in the URL, in .git/config or in the process arguments. Treat the sandbox id and its control URLs as secrets as well, because whoever holds them can run commands as root in that sandbox.
Sizes that are enforced. Solari sandboxes run with 1 to 8 vCPUs and up to 16 GB of memory, and a larger request is rejected, not quietly reduced. Set an idle timeout and decide whether the machine pauses or is killed when it passes.
Snapshots to roll back to. Snapshot a running sandbox before a risky step, then revert or fork it. Pause saves memory and processes, while a stopped sandbox keeps its files and not its running state.
Recordings as evidence. Record a browser session and replay it in the console, or download it as a line-by-line log of everything that happened on the page. Recording captures input values by default, so restrict who can read replays of runs that touch passwords.
For your own trusted jobs, the shared setting runs a sandbox as a process tree inside a VM shared only with your other shared sandboxes, separated by namespaces and a cgroup instead of a hypervisor. It is cheaper and starts faster, and it is the wrong setting for code you did not write.
Some agents need a screen rather than a shell. Solari desktops give computer use models a full Linux computer with the same lifecycle, and a Solari VM starts in about a second. Browsers, sandboxes and desktops sit under the same controls, so the code an agent runs and the sites it visits stay in one place you can audit.
What Comes Next for Agent Sandboxes?
Isolation for agent code will change quickly over the next year, in four ways:
Bug hunting at agent speed. Researchers already point their own agents at sandbox boundaries, which is how a public challenge fills with reports in days. Expect more kernel and hypervisor findings, and less time between disclosure and patch.
Network off as the starting point. Teams will start untrusted code with no egress and open only the domains a job proves it needs, the way firewalls moved to deny by default.
Audit trails in every security review. Reviewers will ask what an agent ran and what it touched, and a recording or command log will be the answer they expect.
A machine per step. As start times fall, agents will take a fresh machine for each risky step and discard it, instead of keeping one long-lived box per agent.
What stays human is the policy: what an agent may reach, which secrets it may hold, and reading the record when something looks wrong. Isolation contains the damage; people still decide where the walls go.
Get Started With Solari
Start with one job: move the code your agent writes into a hardened sandbox, and open the network only for the tasks that prove they need it. Solari is the fastest and cheapest way to run cloud browsers and VMs for agents that run untrusted code. Get started with a free account and start running your agents today.
