SBN

AI Agent on a Laptop: Sandbox or Its Own User Account?


A sandbox limits what the agent’s commands can write and reach. A separate OS user keeps the employee’s files and keys out of its reach. A VM is stronger than both, and none of them tells you when an agent acted through a person’s session.

Most Agents Now Offer a Sandbox

Claude Code, Codex CLI, Gemini CLI, Copilot CLI and Cursor all offer some form of sandbox for the commands the agent runs. They differ a lot. Some use the operating system’s own controls (Seatbelt on macOS, namespaces or Landlock on Linux), some use containers, the defaults differ, and Windows coverage is the weakest. Where it is on, a sandbox can stop a command from writing outside the project folder or opening a connection it was not allowed.

The catch is who the sandbox runs as. In most setups it runs inside the employee’s account. Riptides tested the built-in sandboxes in October 2026 and found credentials still reaching the agent’s commands in several of them: token files, inherited environment variables, tokens handed in on purpose.

What a Separate User Changes

A laptop draws its security lines between users. Each user has a home folder, a browser profile with its cookies, saved sign-ins, and keys the operating system protects for that user (in the TPM through Windows’ key storage, or in the Secure Enclave and Keychain on a Mac). A standard user cannot read another user’s files unless permissions were opened up or it has admin rights.

Run the agent as a different standard user and the employee’s things are no longer its things. This is not a new idea. Developers already do it: a DDEV write-up gives the agent its own Linux user, “coworkers get their own account”, and open-source tools on Windows and macOS create a standard user for the agent.

What a Separate User Does Not Change

  • It shares the kernel. A kernel or privilege-escalation bug crosses the line. A virtual machine has its own kernel and is the stronger boundary, at the cost of speed and setup.
  • It does not limit the network on its own. An allowlist helps, but an agent that can reach GitHub, a package registry or its own model API can still send out anything it can read, through those hosts.
  • Whatever you hand the agent, it holds. A token placed in its environment or project folder is the agent’s to use and to leak.
  • Code is a path back. If the agent changes a git hook, a build script or an editor task, and the developer later runs it, it runs as the developer. Review what the agent changed before you build or run it.
  • It does nothing about prompt injection. An agent fed bad instructions follows them with whatever access it has.
  • Expect your EDR to notice. Creating local accounts and starting processes as them looks like persistence to most endpoint tools, so plan the exclusions with your SOC.

So a separate user is one layer. It pairs with a sandbox profile, an outbound allowlist and short-lived credentials.

The Question None of Them Answers: Did the Agent Use a Person’s Session?

Here is the case that matters for attribution. A developer’s agent, running as the developer, drives the browser the developer is already signed into and changes a setting in an admin console. To the app, that request is the developer. The log says the developer did it.

Session binding, as shipped today, does not change this. Chrome’s Device Bound Session Credentials and Microsoft Entra Token Protection tie the renewal of a session, or the sign-in token, to a key on the device. That stops a copied session from being renewed on another machine. It does not sign each request, and it does not care which program on the device is driving the browser.

Telling the agent apart from the person needs two things together. Requests to company apps have to carry a fresh proof from a key the employee’s account holds, the way DPoP does in OAuth, checked by the app or a proxy in front of it. And the agent has to run as an account that cannot use that key. Then a request the agent makes with the employee’s session, even with the cookie, arrives without a valid proof, and the app can refuse it and show it.

What We Are Building, and What We Have Tested

This is our lab work, being built, to be tested with customers.

Yuthent’s laptop guard runs the agent as its own standard OS user with no groups or extra rights. The employee’s home folder is not visible to it. The agent works in its own account, with its own copy of the code, and what it keeps stays there. Its outbound traffic goes through a filter to the hosts the company allows.

Its access is a separate thing from its account. Its lease is signed by our control plane with a deadline, and a watchdog ends the agent at that deadline even if the guard was stopped. Each request it makes names the agent, the person it works for, the device and the lease. An employee without admin rights cannot remove the guard, and if it stops reporting, the control plane revokes the device’s leases within seconds. An admin can still remove it, and an agent the employee starts outside the guard is not covered.

Sessions to company apps are sealed: every request carries a proof from a browser key held for the employee’s account, and requests without it are marked unsealed.

We ran the test on Windows in our lab on 21 November 2026. An agent under the guard was given the employee’s cookie and session details. It asked for a proof directly and was refused. It started its own Chrome, which reached the key host, and still got no proof, because its account cannot use a key the TPM holds for the employee. Separately, the outbound filter kept it from reaching the app at all. In earlier lab runs, requests replayed with a copied cookie and no proof were marked unsealed and refused by apps set to enforce. We have not run the agent test on macOS or Linux. On a Mac the guard uses a sandbox profile instead of a separate user today, and stolen-cookie detection is not there yet.

The limit, plainly: an agent the employee runs as themselves, outside the guard, can drive the employee’s session on every OS, and in general it looks like the employee.

That is why the few actions that matter keep their own check. The agent’s request waits, the accountable person sees the exact action on their own phone and approves it with the phone’s biometric, and the phone’s hardware key signs that action with a fresh challenge, so the approval cannot be reused for another one. A session cannot produce that signature, and neither can an agent on the laptop.

What to Do This Quarter

  • Turn on the sandbox your agents already offer, and check which credentials still reach it: environment variables, token files, the SSH agent.
  • Run agents as their own standard OS user, or in a VM where the work allows it.
  • Filter the agent’s outbound traffic to the hosts it needs, and remember those hosts are still a way out.
  • Review what the agent changed before you build or run it.
  • Give agents short-lived credentials scoped to the task, never the employee’s. That includes the sign-in to the agent’s own model provider: the employee’s login there is a session too.
  • Turn on session binding where your identity provider and browser support it.
  • Name the few actions that must not run on a session alone, and require the accountable person’s approval for each.

Sources: Riptides, “Every AI Coding Agent Ships a Sandbox Now. Your Credentials Still Get In.” (October 2026); DDEV, “Giving an AI Agent Its Own Linux User” (November 2026).

This post first appeared on the Yuthent blog.