Skip to content

Design overview

The authoritative design is in the repository under docs/spec/. This page is a summary.

Anything inside the sandbox may be controlled by an attacker: a prompt injection in a README, issue, dependency, or web page can take over the agent and get root in the guest. So every control that matters is enforced on the host, and full control of the guest grants none of them.

Process Language Role
wb Go The one command: wb claude … runs a session and relays your terminal; wb diff, wb land, wb approve, … manage the rest
wb-hostd Go Sessions, git round trip, policy, approvals, audit
wb-vmd platform-native (Swift on macOS) Runs the VMs; no policy, no secrets
wb-netd Go Userspace network stack (gVisor) behind the VM’s virtual NIC; DNS
wb-proxyd Go HTTP policy, credential replacement, dependency gate
wb-guestd Go Agent inside the guest: users, terminal sessions, git transport

Only two channels cross the VM boundary: a host-guest socket (vsock) to wb-hostd, and Ethernet frames to wb-netd.

  • One command. wb [wb flags] <command> [args]; everything after wb claude goes to Claude Code unchanged.
  • Separate kernel. A real VM, never a same-kernel sandbox. First target: macOS guests on Macs.
  • Cross-platform core. Most code is Go and the same on macOS, Windows, and Linux hosts; platform-native code is confined to small helpers. wb inside WSL uses the Windows host’s VMs.
  • No host mounts. The project is cloned into the guest; the agent’s work returns as a git branch. Changes to files your machine or CI might execute are flagged.
  • No secrets in the guest. Placeholders only; the proxy removes whatever credential the guest sends and injects the real one.
  • Default-deny egress. Only allowlisted names resolve, to synthetic addresses that lead only to the proxy. The guest cannot reach raw IP addresses, the host, the LAN, or arbitrary DNS servers.
  • One work VM, many projects. Projects share a work VM as separate guest users, new ones included. A repository you don’t trust runs in an isolated VM, with wb --isolated claude or wb project place isolated. (macOS allows two running macOS guests, which this fits.) Projects in one VM share its network grants and credential bindings. A project whose tokens must stay apart runs in the isolated VM.
  • No root or admin on the host, no extra host accounts. Works on managed machines.
Spec Topic
S03-requirementsS03-requirements: RequirementsThe problem Wraith Box solves, and where the requirements that answer it are. The problem, and where the requirements are
S04-architectureS04-architecture: ArchitectureName the processes, the boundaries between them, and which requirement each boundary serves. Architecture: processes and boundaries
S05-cliS05-cli: Command Line InterfaceSpecify wb, the single user-facing command. The wb command
S06-vm-lifecycleS06-vm-lifecycle: VM Lifecycle, Images and the Guest AgentHow guest images are built, how VMs are kept warm, how projects and sessions map onto guests, and what wb-guestd does. Images, VMs, guest users, guest agent
S07-egress-gatewayS07-egress-gateway: Egress GatewayThe only path from a guest to any network: a userspace network stack (wb-netd) and a policy-enforcing proxy (wb-proxyd) on the host. Network stack, DNS, proxy, dependency gate
S08-workspace-and-gitS08-workspace-and-git: Workspace and Git Round TripHow code gets into the guest and how the agent's work gets back out, without sharing the host filesystem. Workspace and the git round trip
S09-policy-credentials-auditS09-policy-credentials-audit: Policy, Credentials, Certificates and AuditWhere policy comes from, how secrets are held, how TLS inspection is trusted, and what is recorded. Policy, credentials, certificates, audit
S10-tech-stackS10-tech-stack: Technology ChoicesFix languages, libraries, packaging, and repository layout, with the reason for each choice. Languages, libraries, packaging
S11-verification-and-spikesS11-verification-and-spikesthe filter's fuzz properties, including one that replays the filtered output and the exit reset into a headless emulator and checks it is back in its initial state, and a conformance case that prints every dropped seq… Verification: test layers, release gate, CI
S12-platformsS12-platforms: PlatformsWhich host and guest operating systems Wraith Box targets, how platform-specific code is isolated, what each platform uses, and how wb works inside WSL. Host and guest platforms, WSL
S13-guest-confinementS13-guest-confinement: Guest ConfinementControls inside the guest that narrow what a project user's processes can do, and tell the host which program opened each connection. Guest confinement: Seatbelt, Network Extension, Endpoint Security
S14-claude-in-guestS14-claude-in-guest: Claude Code in the GuestHow Claude Code gets into the guest image, which of the user's Claude Code configuration goes with it, how it starts, and the agent interface that keeps Claude Code's specifics in one place (V1-02-claude-only). Claude Code in the guest: install, user configuration, agent interface
S15-least-privilegeS15-least-privilege: Least Privilege on the HostThe security design for SEC12-least-privilege: which rights Wraith Box takes on the host, where credentials are held, and how each host process gets only the credentials it needs, for only as long as it needs them. Least privilege on the host: rights, the secret store, access rules, the guest admin user
S16-terminal-streamS16-terminal-stream: Terminal StreamHow wb guards boundary 6 of T00-index, the guest output that wb writes to the user's terminal. The filter on guest output to the host terminal
S17-install-and-upgradeS17-install-and-upgrade: Install, Downloads and UpgradesBuild, install, upgrade and remove a Wraith Box bundle, move its stored data to a new version, and download what an image build needs from the internet. Building, installing and upgrading the bundle; downloads for image builds; migrations

The requirements and the threat model are in FR00-indexFR00-index: Functional requirementsWhat Wraith Box must do for the user., NFR00-indexNFR00-index: Non-functional requirementsHow fast, how small, on which platforms, and how maintainable Wraith Box must be., SEC00-indexSEC00-index: Security requirementsThe security controls Wraith Box enforces. and T00-indexT00-indexboundary 6 is the host terminal stream.. The test cases of each area are in C00-indexC00-index: Test casesThe test cases of each area, by test layer: unit tests, fuzz targets, and conformance checks.. Open questions are spikes, in X00-indexX00-index: SpikesThe open questions that must be answered by a throwaway prototype before work builds on them, in the order they are taken up.. What the first version delivers is in V1-initialV1-initial: Initial versionThe first version: what it delivers, what it leaves out, and the milestones that get there..