S14-04 - Commands and Endpoints
Purpose: Which permission mode Claude Code runs in, the commands that don’t work in a guest, the guest instructions that explain the guest’s limits to Claude Code, and the endpoints Claude Code in the guest may reach.
Design
Section titled “Design”Permission mode
Section titled “Permission mode”wb-guestd doesn’t write permissions.defaultMode. Wraith Box doesn’t
add --permission-mode.
The mode comes from the user’s settings.json in the copy
(S14-02-user-configurationS14-02-user-configuration: User ConfigurationWhich of the user's Claude Code configuration wb reads at session start, and how it treats symbolic links in it.), else from Claude Code’s own default.
--permission-mode after wb claude overrides both, because wb
passes it unchanged (S05-cliS05-cli: Command Line InterfaceSpecify wb, the single user-facing command.).
A user who runs bypassPermissions on the host gets it in the guest.
Claude Code refuses that mode as root, and 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.).
Commands that don’t fit a guest
Section titled “Commands that don’t fit a guest”These fail in the guest, by I60I60 (closed): X01-model-credential: API key mode via the proxySplit from #15 (X01-model-credential) during triage on 2026-10-04. and SEC05-default-denySEC05-default-deny: Default-deny egress, enforced on the hostOnly allowlisted hostnames are reachable.:
claude updateandclaude installfail.DISABLE_UPDATESblocks them, anddownloads.claude.aiis outside the profile. The version comes with the image (S14-01-installS14-01-install: InstallHow the image build downloads Claude Code on the host, checks it, and installs it in the guest image, and which version a guest runs.)./plugin installand the plugin marketplace fail for the same reason. That is a known FR01-drop-inFR01-drop-in: Drop-in for claudewb is the single entry point for everything, structured as wb [wb flags] <command> [command args]. gap in V1V1-initial: Initial versionThe first version: what it delivers, what it leaves out, and the milestones that get there. (S06-08-projects-and-sessionsS06-08-projects-and-sessions: Projects and Sessions Inside a VMHow projects map onto guest users and sessions onto worktrees, and how Claude Code runs in the guest., “Claude Code in the guest”)./idecan’t reach an editor on the host. The guest has no route to the host or the LAN (SEC05-default-denySEC05-default-deny: Default-deny egress, enforced on the hostOnly allowlisted hostnames are reachable.), and V1V1-initial: Initial versionThe first version: what it delivers, what it leaves out, and the milestones that get there. has no port forwarding (V1-08-no-forward-clipboardV1-08-no-forward-clipboard: No port forwarding or clipboardPort forwarding (FR11-port-forward) and the clipboard (FR12-clipboard) are out of scope for V1, so nothing new crosses the VM boundary for them (S06-vm-lifecycle).).
Guest instructions
Section titled “Guest instructions”Some tools fail in the guest with an error that doesn’t name the
reason. An xcodebuild test of a macOS target fails with a
testmanagerd error, because the guest has no GUI login session
(S06-04-vms-and-placementS06-04-vms-and-placement: VMs and PlacementThe work VM and the isolated VM, Xcode in them, and which VM a project's sessions run in., “No GUI login session”). The host passes
that output on as opaque terminal frames and never parses it
(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 explanation goes to Claude Code and the
model.
The image installs a managed CLAUDE.md that names these limits:
- macOS tests through
xcodebuild, and launching a macOS app, fail in a Wraith Box guest, because it has no GUI login session; swift testworks;- the failure is a Wraith Box V1V1-initial: Initial versionThe first version: what it delivers, what it leaves out, and the milestones that get there. limit, which Claude Code tells the user about instead of working around it.
The file:
- is at Claude Code’s managed policy path,
/Library/Application Support/ClaudeCode/CLAUDE.mdon a macOS guest; - is owned by root, with mode 644, in a directory that project users and the toolchain user can’t write to;
- is installed by
wb-guestdwith the binary, in the Claude Code layer (S14-01-installS14-01-install: InstallHow the image build downloads Claude Code on the host, checks it, and installs it in the guest image, and which version a guest runs., “Into the image”).
Its text is compiled into internal/agent/claude, and the wording is
in code. No user setting replaces it. Claude Code’s claudeMdExcludes
can’t exclude a managed CLAUDE.md, and the user’s own CLAUDE.md
(S14-02-user-configurationS14-02-user-configuration: User ConfigurationWhich of the user's Claude Code configuration wb reads at session start, and how it treats symbolic links in it.) loads after it.
The file is guidance for the model, not a control. A session that
turns off CLAUDE.md loading doesn’t get it, and the test still
fails, with the testmanagerd error. A user or project CLAUDE.md
loads after the managed one and can contradict it.
Browser login
Section titled “Browser login”The browser login isn’t a V1V1-initial: Initial versionThe first version: what it delivers, what it leaves out, and the milestones that get there. model credential (B15-browser-loginB15-browser-login: Can Claude Code in the guest run on a browser login while the host keeps the real tokens?Yes, with conditions.). The model credential in V1V1-initial: Initial versionThe first version: what it delivers, what it leaves out, and the milestones that get there. is a placeholder in the session’s environment (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., “Model credential”).
/login, claude login, /logout and claude setup-token start in
the guest. Each fails at its token request.
The model API profile allows the reachability check /v1/oauth/hello
on platform.claude.com. It doesn’t allow a login or token path
(S07-11-http-policyS07-11-http-policy: HTTP PolicyThe HTTP rules of inspected hosts, the built-in profiles, and the parts a user can turn off., “model API”). wb-proxyd refuses:
- the code exchange,
POST platform.claude.com/v1/oauth/token, where/login,claude loginandclaude setup-tokenfail; - the revocation,
POST platform.claude.com/v1/oauth/token/revoke, where/logoutfails.
This holds whatever the policy files allow. A user or repository rule
that could allow a POST to a path starting with /v1/oauth/token on
a model API host is a load error with the rule model-token-path
(S09-02-precedenceS09-02-precedence: PrecedenceHow the policy sources merge, how the mode of each host and port resolves, and how the merge works for a VM with more than one project., “The OAuth token paths”).
Refusing /v1/oauth/hello wouldn’t stop the login prompt
(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?, “Browser login (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?)”):
- Claude Code builds the authorize URL on
claude.com(/cai/oauth/authorize) without a request. - 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? saw
/v1/oauth/helloin one login of two. There the call came between the pasted code and the exchange.
Residual
Section titled “Residual”Claude Code in the guest can still print a real authorize URL, with its PKCE challenge.
A user can open it, sign in on the host, and paste the code into the
guest. That gives the guest a code and its verifier. The guest can’t
redeem them through wb-proxyd. But it can send them out through a
channel that policy allows, and they can be redeemed elsewhere
(T19-pasted-login-codeT19-pasted-login-code: A login code pasted into a guestClaude Code in the guest can print a real authorize URL with its PKCE challenge.).
Warning
Section titled “Warning”wb tells the user never to paste a login or setup-token code into
a guest. It says so at a project’s first session and in wb help.
The terminal stream doesn’t filter the authorize URL (B15-browser-loginB15-browser-login: Can Claude Code in the guest run on a browser login while the host keeps the real tokens?Yes, with conditions.).
Telemetry and other endpoints
Section titled “Telemetry and other endpoints”The model API profile is the list of what Claude Code in the guest may reach (S07-11-http-policyS07-11-http-policy: HTTP PolicyThe HTTP rules of inspected hosts, the built-in profiles, and the parts a user can turn off., “model API”).
- Anthropic’s event log is a built-in deny.
- Datadog, the updater and the changelog are outside the profile.
The guest sets CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC=1 and
DISABLE_UPDATES=1 (S06-08-projects-and-sessionsS06-08-projects-and-sessions: Projects and Sessions Inside a VMHow projects map onto guest users and sessions onto worktrees, and how Claude Code runs in the guest., “Claude Code in the guest”). The profile is the control, not the guest’s environment.
Decisions
Section titled “Decisions”Keep the user’s permission mode
Section titled “Keep the user’s permission mode”Wraith Box doesn’t set a permission mode of its own.
- Rejected: defaulting to
bypassPermissions. It changes Claude Code’s behavior behind the user’s settings, and breaks FR01-drop-inFR01-drop-in: Drop-in for claudewb is the single entry point for everything, structured as wb [wb flags] <command> [command args].. - Decided: 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., row 2.
Explain guest limits in a managed CLAUDE.md
Section titled “Explain guest limits in a managed CLAUDE.md”- Why: the
testmanagerderror reaches only Claude Code and the model. The host never sees it, and parsing it there would add a parser of guest output. - Rejected: an
xcodebuildwrapper in the image whose outputwb-hostdrewrites. - Rejected: writing the note into the project user’s
~/.claude/CLAUDE.md. That file is the user’s copy (S14-02-user-configurationS14-02-user-configuration: User ConfigurationWhich of the user's Claude Code configuration wb reads at session start, and how it treats symbolic links in it.), and the project user can change it. - Decided: I224I224 (closed): S06-vm-lifecycle: which process explains the testmanagerd failure in the guest (B20 decision 1A)S06-vm-lifecycle, "No GUI login session" (B20-guest-xcode decision 1A, #20, PR #221) says wb replaces the testmanagerd error from xcodebuild with a message that names the v1 limit (NFR06-explained-refusals)., triage of 2026-10-16.
The model API profile lists every endpoint
Section titled “The model API profile lists every endpoint”Out of scope
Section titled “Out of scope”- A host-side browser login, in which
wb-proxydholds the real tokens and answers Claude Code’s refresh. It comes after V1V1-initial: Initial versionThe first version: what it delivers, what it leaves out, and the milestones that get there. (I257I257 (open): Host-side browser login for the model credential (after V1)A host-side browser login for the model credential, deferred past V1 by the B15-browser-login decision on #15 (2026-10-15, option B not chosen for V1).). - The endpoints of API key mode beyond the placeholder on
api.anthropic.com. They are deferred to I253I253 (open): X01-model-credential: API key mode end to end via the proxyDoes Claude Code work end to end in API key mode with a placeholder API key while wb-proxyd injects the real key in x-api-key?.
Status: Draft