An agent with access to “everything” on a personal laptop is a case from Tina Huang’s warnings: “people installed local agents with no security settings and had their emails deleted”. The mechanics of the trouble are simple: an autonomous agent performs hundreds of actions a day, and one misunderstood instruction costs months of recovery — emails, files, reputation. This piece covers an isolation architecture that grew out of real incidents: three placement levels, a seven-point checklist, commands for the container and the firewall, and guard hooks.
Three isolation levels: from a container to a dedicated server
| Level | Machine | Data | For whom |
|---|---|---|---|
| Minimal | Container/VM on the work machine | Only project files in a volume | A single coding agent |
| Standard | A dedicated old laptop/mini-PC | Cleaned, no personal data | 24/7 agents (case: a 16 GB MacBook running OpenClaw) |
| Maximum | VPS / Mac mini in a rack | Empty machine, data arrives via API | Autonomous teams, production loops |
Tina Huang’s rule sounds harsh, but it is exactly what separates a working stack from an accident waiting to happen: “agents do not run on the main machine where all my data lives — only on dedicated, wiped machines”. An old MacBook Pro with 16 GB of memory serving an agent loop around the clock is the budget baseline: the hardware is not bought but reused, and in case of an incident it “heals” with a system reinstall over one evening. How such a loop is assembled end to end — schedule, pulse, channels — is covered in the piece on OpenClaw in 24/7 mode.
How to pick a level. An agent that only writes code in a project folder — a container is enough. An agent that lives around the clock, goes online, and works with email — a separate machine. Several agents, and the loop touches money or clients — a VPS or a server with an empty disk, from which data arrives only via API. The level rises gradually: you can start with a container and move to a dedicated machine as soon as the agent needs access to anything beyond code.
Launch checklist: seven points in one evening
- The machine is wiped. No personal files; a separate system user — and not an admin. On Linux the user is created with the command
sudo adduser agent, on Windows — a standard account without administrator rights, on macOS — a regular, non-admin account. The agent works under this user, not under yours. - Permissions are minimal. Access only to the needed folders; email is a separate mailbox created specifically for the agent; none of your personal accounts within reach. The trick is simple: list what the agent needs for its task and cut everything else.
- Hooks on the destructive. Guard scripts for file deletion, repository pushes, and sending email — locks instead of requests: the block fires mechanically, not by an instruction “please don’t”. A working example is below.
- Separate keys. The agent gets its own API keys with budget caps — not your working ones. A leaked agent key with a limit is an annoyance; a leaked key from your main account is a catastrophe.
- Third-party skills go through a scan. Skills and instructions from public catalogs are rewritten by your own hand after analysis, not installed as-is: injected instructions in someone else’s files are a real infection vector.
- Logging is on. Every agent action is logged; an audit at least once a day. The log is what you use to reconstruct the picture of an incident after the fact.
- Reversibility. The machine is reinstalled in one evening: a clean OS plus a setup script that restores the environment. The worst thing in an incident cannot be lost if nothing valuable was stored on the machine in the first place.
Isolation in practice: container, network, secrets
Container: hard resource ceilings
The minimal level is a container with trimmed kernel privileges and resource ceilings. A typical launch (adjust the values to your hardware):
docker run -d --name agent-sandbox \
--memory=4g --cpus=2 \
--cap-drop=ALL \
--pids-limit=256 \
--read-only \
--tmpfs /tmp:rw,size=512m \
-v "$HOME/agent-work":/work \
-w /work \
node:22-bookworm \
sleep infinity
docker exec -it agent-sandbox bashWhat each flag does. --read-only makes the container’s root filesystem immutable: the agent can write only into the mounted /work folder and the temporary /tmp. --cap-drop=ALL strips kernel privileges. --pids-limit forbids spawning thousands of processes. --memory and --cpus keep a hung agent from taking down the host. Your documents, email, and browser stay untouched on the outside — the agent physically cannot reach them. An alternative to the container is a virtual machine: slower to maintain, but it isolates both the network and the filesystem as a whole.
Network: allow nothing outbound except what is permitted
A crude but effective trick on a dedicated Linux machine — deny outbound connections except explicitly allowed addresses (the IP is schematic — substitute your own):
ufw default deny outgoing
ufw allow out to 203.0.113.10 port 443 proto tcp
ufw enableA whitelist by domain requires a proxy with filtering: a firewall works with addresses, and those drift for large services. But even “HTTPS to a single address only” cuts off the scenario where the agent “decided on its own” to visit somewhere else — half of the surprises are closed by this alone.
Email, secrets, and sensitive data
- A separate email for the agent. Personal mail is out of reach by construction: even if the agent “tidies up” its own mailbox, yours stays untouched — the deleted-emails incident becomes technically impossible, not merely “against instructions”.
- Secrets stay off the machine. Keys live in a secrets manager; the agent requests them via API — with limits and an issuance log. Only references to environment variables remain on disk, without the values themselves.
- Sensitive data bypasses the agent. If the task cannot be solved without the data, there is an option not to send it to the cloud at all: a local model on your machine. How to assemble such a loop is covered in the piece on local models for sensitive data.
- Confirmations of critical steps. Outgoing mail, payments, publishing — only with explicit human confirmation. The gradation “always ask / ask when in doubt / do it yourself” is formalized by the Cowork autonomy levels.
- Regular audit. Action log, anomaly hunt, permission review — a daily ritual of an autonomous loop, not a reaction to “something went wrong”.
Guard hooks: locks instead of requests
An instruction in the agent’s memory is a request: the model can ignore it or forget it by mid-session. A hook is mechanics: a script runs before the dangerous action and blocks it. In harnesses like Claude Code, hooks are configured in settings.json — a check is attached to every tool call:
{
"hooks": {
"PreToolUse": [
{
"matcher": "Bash",
"hooks": [
{ "type": "command", "command": "python guard.py" }
]
}
]
}
}The guard script reads JSON from standard input and returns code 2 when the command must be blocked:
import sys, json
data = json.load(sys.stdin)
cmd = data.get("tool_input", {}).get("command", "")
forbidden = ["rm -rf", "git push --force", "DROP TABLE"]
if any(p in cmd for p in forbidden):
sys.exit(2)
sys.exit(0)Return code 2 from a PreToolUse hook cancels the tool call: the command never reaches the model and never executes. The pattern list expands to fit your stack — outgoing mail, permission changes, folder wipes, API key patterns. A full walkthrough of events and configuration is in the guide to hooks and guard scripts.
A guard is not only about forbidding. The second mode of a hook is recording: every executed action is written to a log, over which you then run the daily audit. A blocking hook on the destructive plus a logging hook on everything else is the standard kit of an autonomous loop.
Incidents that shaped the rules
- Deleted emails. An agent with access to personal mail “tidied things up” — the emails were lost (Huang’s case). Rule: the agent has its own mailbox; yours stays outside its reach.
- Infection through third-party skills. Injected instructions in publicly available skills produced virus-like behavior. Rule: other people’s skills are read and rewritten first, run second.
- A 30% discount to a client. Auto-approve plus no hooks on outgoing messages: the agent agreed to a discount without the owner; the damage was reputational. Rule: anything outgoing goes through a confirmation or a hook.
- Key theft. An API key stolen from a chat within 10 minutes, 200 hijack emails sent through someone else’s limit. Rule: key isolation, budget caps, key patterns in hooks. The incident, step by step, is in the breakdown of an API key stolen in 10 minutes.
The common denominator of all four cases: access wider than necessary plus no mechanical guards. In none of them did instructions and good will save the day — those are not a security architecture, they are wishes of one.
Frequently asked questions
VPS or a local dedicated machine? A VPS gives 24/7 uptime and isolation from the home network; a local dedicated machine is cheaper, and the data is physically yours. A working hybrid is a local machine with a firewall and a regular backup.
Is a container enough? For coding agents with access to a project folder — yes. For agents with email and a browser, a separate machine is safer: a container limits the filesystem but not the scenario “the agent was given the mailbox password”.
Who pays for an incident? The irony of security: uninsured damage is always paid by the owner — recovery hours, lost emails, reputation. The insurance is exactly the isolation described above, and it costs one evening.
How long does isolation take? The standard level — one evening: the machine is wiped, the keys are separate, the hooks are in place. One evening against months of recovery is the best deal in agent practice.
Agent isolation is not paranoia but hygiene: a dedicated machine, minimal permissions, hooks on the destructive, a daily audit. Before you launch the next 24/7 loop, run through the seven-point checklist: after that, the scariest agent mistake will cost a system reinstall over one evening — not your data and reputation. The practice is current as of fall 2026.
