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.
The problem
Section titled “The problem”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.
Decisions you can make now
Section titled “Decisions you can make now”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 |
Options for the user’s configuration
Section titled “Options for the user’s configuration”The issue gives a proposal without alternatives, so these options are the brief’s.
Impact
Section titled “Impact”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.
Evidence
Section titled “Evidence”- verified
~/.claude.jsonholds “your sign-in session, MCP server configurations, per-project state such as trust decisions” (Claude Code settings). - verified Settings precedence is managed, command line, project local, shared project, user. A
--permission-modeflag takes precedence over a mode set in user settings, andbypassPermissionstakes effect from user,--settingsor managed settings, not from project files (same page). - verified
wb claudepasses its arguments to Claude Code unchanged (FR01-drop-inFR01-drop-in: Drop-in for claudewb is the single entry point for everything, structured as wb [wb flags] <command> [command args]., S05-cliS05-cli: Command Line InterfaceSpecify wb, the single user-facing command. “Agent commands”), so the user’s--permission-modereaches it. - verified Claude Code’s documentation recommends
bypassPermissionsfor “isolated containers and VMs only”, and refuses it as root or undersudo(permission modes). Project users are never root (S13-01-process-hardeningS13-01-process-hardening: Layer 1: Process Hardening (v1)How wb-guestd hardens every process it starts for a project user, and how it stops and kills a project user's processes.). - verified Auto mode is the built-in starting mode from Claude Code 2.1.283. Its classifier checks count toward token use on API accounts (same page).
claude --versionon this host prints 2.1.289. - verified
DISABLE_AUTOUPDATERstops only the background check.DISABLE_UPDATESblocks every update path,claude updateincluded (advanced setup, “Disable auto-updates”). - verified Each release has a GPG-signed
manifest.jsonwith a SHA-256 checksum per binary, and the macOS binary is signed by Anthropic and notarized (same page, “Binary integrity”). The native installer puts versions under the user’s home, so a per-machine install in the image needs another route. - verified
CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFICturns off updates, telemetry and error reporting, and also feature-flag fetching, which some features need (environment variables). - verified The image seal scans for secrets and fails the build on a find (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.). The guest environment is built from an allowlist (S09-05-credentialsS09-05-credentials: CredentialsHow credentials are stored and bound to requests, and how the model credential reaches the model API without entering the guest., “Never in the guest”).
- inferred With the download host not allowlisted, a guest that turns updates back on can’t download a new binary (SEC05-default-denySEC05-default-deny: Default-deny egress, enforced on the hostOnly allowlisted hostnames are reachable.).
DISABLE_UPDATESstops the attempt and its error messages. It isn’t the control. - assumed That the image seal’s scanner catches the tokens users put in
CLAUDE.md, skills, and agent files. The scanner isn’t written yet. The implementation of the seal (V1-M2-walking-skeletonV1-M2-walking-skeleton: Walking skeletonwb-vmd boots a fixture VM bundle in its confined process, wb-guestd answers over vsock, a data disk made on the host holds the homes, and wb shell opens a PTY as a project user, with its output through the terminal fi…) should test it on real~/.claude/directories. - assumed That Claude Code works with a placeholder credential, and which login Wraith Box owns. That is 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? (I15I15 (closed): X01-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?).
What this unblocks
Section titled “What this unblocks”- Drafting the agent spec, which 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. asks for. The draft waits 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? (I15I15 (closed): X01-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?) for the login,
/login, and the endpoint list of the model API profile. - The “Claude Code in the guest” lane of
docs/implementation-plan.md, and with it V1-M4-claude-end-to-endV1-M4-claude-end-to-end: `wb claude` end to endGit round trip with carry-in, landing and flagging, the model credential, the terminal records and the session summary, wb diff and wb land, on a sealed image. (FR01-drop-inFR01-drop-in: Drop-in for claudewb is the single entry point for everything, structured as wb [wb flags] <command> [command args]., 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.). - The base image contents in 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. (), which then list the pinned Claude Code build.
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
- Permission mode: how Claude Code decides whether to ask before acting.
bypassPermissionsnever asks. auto asks a classifier model. The default mode asks the user. - Managed settings: a settings file in a system directory that takes precedence over every user and project setting. Guest root can change it. In the guest it sets defaults and doesn’t enforce anything.
- Hook: a command Claude Code runs on an event, configured in settings.
- MCP server: a tool server Claude Code connects to. Its definition can hold API keys in its environment.
- Plugin: a bundle of skills, agents, hooks and MCP servers installed from a marketplace.
- Placeholder credential: a fake token in the guest that
wb-proxydreplaces with the real one on the host side (SEC04-no-guest-secretsSEC04-no-guest-secrets: No secrets in the guestThis includes the model credential.). - Image seal: the scan for secrets that runs before an image can be used (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.).