S03 - Requirements
Purpose: The problem Wraith Box solves, and where the requirements that answer it are.
Design
Section titled “Design”Problem
Section titled “Problem”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.
Requirements
Section titled “Requirements”Every other spec traces back to these:
- FR00-indexFR00-index: Functional requirementsWhat Wraith Box must do for the user.: what Wraith Box must do for the user.
- SEC00-indexSEC00-index: Security requirementsThe security controls Wraith Box enforces.: the security controls, never weakened.
- NFR00-indexNFR00-index: Non-functional requirementsHow fast, how small, on which platforms, and how maintainable Wraith Box must be.: how fast, how small, on which platforms.
- T00-indexT00-indexboundary 6 is the host terminal stream.: the adversary, the assets, the trust boundaries, and the risks accepted rather than solved.
- V1-initialV1-initial: Initial versionThe first version: what it delivers, what it leaves out, and the milestones that get there.: what the first version delivers and leaves out.
Unit of enforcement
Section titled “Unit of enforcement”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:
- Any process in a VM can use those of every project with a session there (S07-01-per-vm-policyS07-01-per-vm-policy: Enforced per VMWhy the VM is the unit the gateway enforces, how the policies of its projects combine, and what happens when they conflict or change.).
- Per-project rules narrow that only by a label the guest reports.
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).).
Decisions
Section titled “Decisions”Grants per VM, not per project
Section titled “Grants per VM, not per project”The host enforces network grants, credential bindings, and approvals per VM.
- Why: the host sees one network address per VM, and can’t tell which project opened a connection.
- Decided: the maintainer accepted this residual risk on I36I36 (closed): S07-egress-gateway: attribute network flows to projects in the shared work VMThe work VM hosts every trusted project, and its wb-netd sees one guest MAC and one leased IPv4 address (S07-egress-gateway "Addressing").. T00-indexT00-indexboundary 6 is the host terminal stream. records it as T11-shared-vm-grantsT11-shared-vm-grants: Projects in one VM share network grantsThe host sees one guest address per VM, and can't tell which project user, session or program opened a connection..
Shared isolated VM, and new projects in the work VM
Section titled “Shared isolated VM, and new projects in the work VM”- Decided: the maintainer accepted 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). and 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). on I42I42 (closed): S05-cli, S06-vm-lifecycle, S09-policy-credentials-audit: separate configuration trust from VM placement; project identityThe specs use "trusted" for two different things and do not give a default: (2026-10-06, B42-trust-placementB42-trust-placement: Where does a new project run, and what makes it the same project later?Split "trusted" into two named settings, start new projects in the isolated VM until the user moves them, and key project identity on the git directory rather than the remote URL.).
Status: Draft