Skip to content

How does Claude Code run in the guest, and which of the user's settings go with it?

Decided 2026-10-04: per row, see the comment on I45I45 (closed): S14 (new): Claude Code in the guest and the agent interface (V1-02-claude-only)No spec says how Claude Code itself runs in the guest.. The decision and its reasons are in the I45I45 (closed): S14 (new): Claude Code in the guest and the agent interface (V1-02-claude-only)No spec says how Claude Code itself runs in the guest. comment that starts Decision (2026-10-04):. Source: I45I45 (closed): S14 (new): Claude Code in the guest and the agent interface (V1-02-claude-only)No spec says how Claude Code itself runs in the guest.. Affects V1-02-claude-onlyV1-02-claude-only: Claude Code onlyClaude Code is the supported agent., S05-cliS05-cli: Command Line InterfaceSpecify wb, the single user-facing 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., 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., 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., and a new agent spec.

host: trusted~/.claude/settings, CLAUDE.md, agents,skills, plugins, hooks~/.claude.jsonsign-in, MCP serverswb-hostdallowlist,secret scanwb-proxydmodel credentialmodel APIAnthropicguest VM: untrustedwb-guestdwrites the copyproject user~/.claude/ copyClaude Codepinned in the image,updates offvia wb-netdnever: sign-in, MCP keys

Figure 1. The user’s global Claude Code configuration is on the host. wb-hostd copies an allowlisted part of it into the project user’s home through wb-guestd, after a secret scan. The sign-in session and MCP server definitions in ~/.claude.json, and hooks, stay on the host (red). Claude Code in the guest holds only a placeholder and reaches the model API through wb-proxyd, which adds the real credential.

The issue bundles six sub-decisions. Items 4 and 5 wait on X01-model-credentialX01-model-credential: Model credential via the proxyDoes Claude Code work with a placeholder credential while wb-proxyd injects the real one, for each supported authentication mode, including token refresh? in part or in full. You can settle the rest now.

# Sub-decision Recommendation Decide
1 Install and update Install a signed, pinned Claude Code build in the image in a system directory that project users can’t write to. Set DISABLE_UPDATES in the guest’s managed settings. A new version arrives with wb image build. Never allowlist the download host. now
2 Permission mode wb-guestd writes permissions.defaultMode: "bypassPermissions" in the project user’s settings. A user who wants prompts passes --permission-mode after wb claude, which reaches Claude Code unchanged and takes precedence over user settings. now
3 User configuration Option A below: an allowlist, minus the keys that run commands or hold secrets. now
4 Commands that don’t fit claude update is refused by DISABLE_UPDATES. /ide can’t reach a host editor (SEC05-default-denySEC05-default-deny: Default-deny egress, enforced on the hostOnly allowlisted hostnames are reachable.) and the agent spec says so. /login waits for X01-model-credentialX01-model-credential: Model credential via the proxyDoes Claude Code work with a placeholder credential while wb-proxyd injects the real one, for each supported authentication mode, including token refresh?. partly
5 Telemetry and other endpoints The model API profile lists only what Claude Code needs to work. The endpoint list waits for X01-model-credentialX01-model-credential: Model credential via the proxyDoes Claude Code work with a placeholder credential while wb-proxyd injects the real one, for each supported authentication mode, including token refresh?, which lists them. after X01-model-credentialX01-model-credential: Model credential via the proxyDoes Claude Code work with a placeholder credential while wb-proxyd injects the real one, for each supported authentication mode, including token refresh?
6 Agent interface (V1-02-claude-onlyV1-02-claude-only: Claude Code onlyClaude Code is the supported agent.) The agent spec defines the interface as what Claude Code needs (image install step, configuration carry-in rules, credential bindings, endpoint profile, launch environment), with Claude Code as its only implementation. No general design before a second agent exists. now

The issue gives a proposal without alternatives, so these options are the brief’s.

At each session start, wb-hostd copies CLAUDE.md, agents/, skills/, commands/ and settings.json from ~/.claude/. It removes the hooks, env, apiKeyHelper and MCP keys from the settings, leaves out plugins, and runs the image seal’s secret scanner over the result. Anything left out is listed. The user can add hooks or MCP servers by name.

C. Copy both files and the directory whole

Section titled “C. Copy both files and the directory whole”

Copy ~/.claude/ and ~/.claude.json as they are.

RequirementA. AllowlistB. NothingC. Everything
SEC04-no-guest-secretsSEC04-no-guest-secrets: No secrets in the guestThis includes the model credential. the guest holds only placeholdersscanner-dependentkeptweakened
SEC03-no-host-execSEC03-no-host-exec: No host code execution via returned workNothing the agent produces executes on the host without an explicit user action; returned changes to files the host may later execute are flagged. nothing from the guest runs on the hostone-way copykeptone-way copy
FR01-drop-inFR01-drop-in: Drop-in for claudewb is the single entry point for everything, structured as wb [wb flags] <command> [command args]. wb claude behaves like claudeuser’s setup appliesempty setupfull setup
FR13-claude-stateFR13-claude-state: Claude Code state per projectClaude Code's conversation history, and the state it keeps only in the guest, persist per project, so --resume/--continue work within a project. state persists per projectper projectper projecthost sign-in shared
Spec workagent spec, 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.agent specSEC00-indexSEC00-index: Security requirementsThe security controls Wraith Box enforces. change

SEC05-default-denySEC05-default-deny: Default-deny egress, enforced on the hostOnly allowlisted hostnames are reachable. (only allowlisted hosts are reachable) holds under every option, and so do the update and permission defaults in the table above.

Details and glossary

Why carry-in is per session. The user edits ~/.claude/ on the host between sessions. Copying at session start keeps the guest current. The copy is small, so it shouldn’t move NFR01-startupNFR01-startup: StartupGoals: a warm VM reaches the Claude prompt in about 4 s and a suspended VM in about 7 s, and no start takes more than 10 s (p95), excluding first-time project setup and the first boot after a host restart., but the implementation should measure it.

Why the user’s own hooks stay out. Hooks are commands Claude Code runs at points in a session. On the host they run as the user. Carried into the guest they would run as the project user, with any token they hold now in the guest. Some hooks only make sense on the host (desktop notifications, editor integration). A user who wants one in the guest lists it by name.

Version skew. The host’s Claude Code and the guest’s can differ. Only configuration files cross, and Claude Code ignores keys it doesn’t know, so an older guest build with a newer host configuration is expected to work. The agent spec should say what wb prints when it doesn’t.

Glossary