Skip to content

S03 - Requirements

Purpose: The problem Wraith Box solves, and where the requirements that answer it are.

Coding agents such as Claude Code are most useful when they can run tools without asking permission for each step. Running them that way directly on a developer’s machine exposes everything the developer can reach: files, credentials, other repositories, accounts.

Wraith Box runs Claude Code inside a disposable-feeling but persistent virtual machine. The agent keeps a native toolchain for the operating system it works on. The host, its secrets, and its network stay under host-side control.

The first delivery target is macOS guests on macOS hosts. The design is for macOS, Windows, and Linux hosts, with Linux and Windows guests on each of them (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.). Platform-specific code is kept behind narrow interfaces, so later platforms do not reshape the core.

The design assumes the agent is capable and possibly adversarial. A prompt injection in a README, issue, dependency, or web page may take full control of everything inside the sandbox, including root in the guest. Agents are increasingly good at finding ways out of their environment. So every control that matters is enforced outside the guest.

Every other spec traces back to these:

Projects whose placement is work share the work VM, each as its own guest user (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.). work is the default for a new project.

The host keeps their files, settings, and returned work apart. But it sees one network address per VM, and can’t tell which project opened a connection. So it enforces network grants, credential bindings and approvals per VM:

SEC06-repo-writesSEC06-repo-writes: Repository-scoped writesGit pushes and repository-mutating API calls are allowed only for the repositories of the projects that have a session in the VM. and SEC08-proj-isolationSEC08-proj-isolation: Per-project isolationEach project has its own guest user, state and history, and one project cannot persist into another. say what is enforced per VM and what per project.

Sessions started with --isolated, and projects marked shared, run in the isolated VM together. There, the repositories the user trusts least aren’t isolated from each other (T05-cross-proj-clonesT05-cross-proj-clones: Other projects' clones after guest rootAfter a guest root escalation inside the shared work VM, read or write access to other projects' guest clones (code only; no secrets are present; changes still return only as reviewable branches).).

A new project starts in the work VM. It gets the grants of the work-VM projects (T13-new-project-grantsT13-new-project-grants: New projects share the work VM's grantsA newly registered project has placement = work (S06-04-vms-and-placement).).

The host enforces network grants, credential bindings, and approvals per VM.

Shared isolated VM, and new projects in the work VM

Section titled “Shared isolated VM, and new projects in the work VM”

Status: Draft