← All posts

An AI coding agent can delete your home directory. Give it a sandbox instead.

October 12, 2026 · 5 min read · The xShellz Team

TL;DR

  • A coding agent runs real shell commands with your real permissions, so running it on your laptop risks your actual files.
  • Agent Shell (xshellz.box) is a hardened Ubuntu 24.04 box where root is remapped with userns-remap and filtered by gVisor, so an agent's damage is contained.
  • Every tier is always-on, free included, with 0 idle timeout, so the agent keeps working after you close your laptop.

No, not if you care about your files. A coding agent like Claude Code or Gemini CLI runs real shell commands with your real permissions, and one wrong glob can delete things you cannot get back. Hand the agent a separate Linux box instead. We build and operate xShellz: the borg terminal agent, the Agent Shell boxes and the hosted model gateway behind them, and this is the setup we run in production ourselves.

Is it safe to let an AI coding agent run commands on my actual computer?

No. An agent is only useful because it executes: it runs tests, creates files, installs packages, moves things around. To do that it needs write access, and on your laptop that write access covers your home directory, your photos, your work repos, your SSH keys. Claude Code and Gemini CLI do not preview every command for you; they compose shell commands and run them. A command that looks correct can have a destructive edge case, like a glob that expands to more files than you expected. The fix is not to stop using agents. It is to give the agent a machine you would not mind losing. That is what Agent Shell (xshellz.box) is: a dedicated Ubuntu 24.04 box you connect to over SSH and let the agent trash.

can I let Claude Code run rm -rf safely?

Yes, if Claude Code is running on a box you can rebuild in minutes, not on your actual computer. The danger is not one specific command. It is that an agent composes commands from context and you do not review every one. The same agent that fixes your failing test can also decide a cleanup step needs a recursive delete, and a path that was right in one session is wrong in another. On Agent Shell, /root is the persistent home and everything outside it is ephemeral, reset when the box is rebuilt on a newer image. If an agent deletes something in /root, you lose only what lived in that sandbox, never your laptop's filesystem. Rebuilding is cheap, and a manifest file in your home dir reinstalls every package on boot.

how to give an AI agent a remote linux sandbox

Get a box, SSH into it, start the agent inside tmux so it survives your logout. Agent Shell is always-on, free tier included, with 0 idle timeout, so the agent keeps running when you close the laptop. The box ships with 6 coding agent CLIs preinstalled: borg, Claude Code, Codex, Gemini CLI, opencode and pi. Nothing to install. You bring your own API key and pick the one you like.

ssh -p <port> root@<host>
tmux new -s agent
claude

The first line connects you as root on the box. The second starts a tmux session named "agent" so the process keeps running after you disconnect. The third launches Claude Code inside that session. Detach with Ctrl-b d and log out; the agent is still working.

what is a hardened sandbox for AI agents

A Linux environment where "root" is not really root and the kernel is filtered. Agent Shell is not a raw VPS. It runs fake-root via Linux user namespaces with Docker's userns-remap, and every process sits inside a gVisor sandbox that intercepts syscalls. A raw VPS hands your agent real root on a real kernel, which means a compromised or careless agent has the whole box and its network as attack surface. This remapping is how user namespaces give a process the illusion of root without host privileges. We picked userns-remap plus gVisor over a plain VPS because a coding agent that escapes the sandbox is far worse than one that occasionally bumps into a sandbox limitation. The tradeoff we accepted: some kernel tricks do not work inside gVisor, but nothing the agent does can reach the host.

running AI coding agents in a gVisor container

Every box runs Ubuntu 24.04 LTS with the 6 coding agent CLIs preinstalled, all bring-your-own-key. If you want borg, the terminal agent we build, it is one static Go binary with no runtime to install:

curl -fsSL https://turborg.com/install.sh | sh
borg

The first line installs borg (it installs as both borg and turborg, same binary). The second starts the REPL in the current directory. borg can also use hosted xShellz models: Chuppa Flash, Chuppa Pro, Floko and Axiom. To wire a box into Claude Code as an MCP server over SSH:

claude mcp add xshellz -- ssh -p <port> agent@<host> xshellz-mcp

That registers the box as an MCP server so Claude Code on your laptop can drive tools on the remote box. Same sandbox, same isolation, but the agent's filesystem changes land on the box, not on your machine.

Frequently asked questions

Do I need to keep my laptop on for the agent to keep running?

No. The box runs 24/7, every tier including free, with 0 idle timeout and 0 trial countdown. Start the agent in tmux, close the laptop, and it is still working tomorrow.

What survives when the box is rebuilt?

/root is the persistent home and the only path that survives a rebuild. Everything else is ephemeral. Put an xshellz.box manifest in your home dir with one package per line (a bare name or apt: for apt, pip: or npm:), and it reinstalls on every boot.

Is this the same as renting a normal VPS?

No. A VPS hands you real root on a real kernel. Agent Shell remaps root with userns-remap and filters syscalls with gVisor, so a misbehaving agent has a much smaller escape surface. The filesystem outside /root is also ephemeral.