Can Claude Code in the guest run on a browser login while the host keeps the real tokens?
Answered 2026-10-15: yes, with conditions. Decided 2026-10-15: 1A, not in V1V1-initial: Initial versionThe first version: what it delivers, what it leaves out, and the milestones that get there., and 2A, the warning stays. The decisions are in the 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? comment that starts Decision (2026-10-15). Spec changes in I256I256 (closed): S14-claude-in-guest, S09-policy-credentials-audit: browser login decisions from B15-browser-loginSpec changes from the B15-browser-login decisions on #15 (2026-10-15)., the deferred design in 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).. Source: 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?, 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?)”. Touches 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., S14-claude-in-guestS14-claude-in-guest: Claude Code in the GuestHow Claude Code gets into the guest image, which of the user's Claude Code configuration goes with it, how it starts, and the agent interface that keeps Claude Code's specifics in one place (V1-02-claude-only). and S15-least-privilegeS15-least-privilege: Least Privilege on the HostThe security design for SEC12-least-privilege: which rights Wraith Box takes on the host, where credentials are held, and how each host process gets only the credentials it needs, for only as long as it needs them.. API key mode moved 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?.
Figure 1. The measured mode, drawn as it would be with a guest. Claude Code holds only placeholders. wb-proxyd adds the real access token on the model API, and on a refresh sends the real refresh token and hands Claude Code placeholders for the new tokens. The sign-in happens in a browser on the host. Red: a login code pasted into the guest, which decision 2 is about.
Decision 1: the browser login in V1
Section titled “Decision 1: the browser login in V1”Impact
Section titled “Impact”| Requirement | A. Not in V1V1-initial: Initial versionThe first version: what it delivers, what it leaves out, and the milestones that get there. | B. Host-side login | C. In the guest |
|---|---|---|---|
| SEC04-no-guest-secretsSEC04-no-guest-secrets: No secrets in the guestThis includes the model credential. no secrets in the guest | placeholder only | placeholders only | real tokens |
| SEC05-default-denySEC05-default-deny: Default-deny egress, enforced on the hostOnly allowlisted hostnames are reachable. only allowed hosts and paths are reachable | profile unchanged | token endpoint, organization paths | login hosts |
| FR01-drop-inFR01-drop-in: Drop-in for claudewb is the single entry point for everything, structured as wb [wb flags] <command> [command args]. Claude Code works as on the host | no /login, a token instead | no /login in the guest | as on the host |
Decision 2: the authorize URL in a guest
Section titled “Decision 2: the authorize URL in a guest”/login in a guest prints a real authorize URL, and refusing /v1/oauth/hello doesn’t stop it. A user who opens it and pastes the code into the guest gives the guest a code it can’t redeem through wb-proxyd, but can send out. S14-claude-in-guestS14-claude-in-guest: Claude Code in the GuestHow Claude Code gets into the guest image, which of the user's Claude Code configuration goes with it, how it starts, and the agent interface that keeps Claude Code's specifics in one place (V1-02-claude-only). has wb warn against it.
Evidence
Section titled “Evidence”- verified
-pansweredpongafter a refresh,-p --resumeansweredI replied with "pong".after a second, and the interactive session answered a question, with placeholders in Claude Code’s store. Source: 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?, “Answer (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?)”, the run’s output. - verified Each refresh returned a new refresh token, and the access token lives 8 hours. Source: the proxy’s
REFRESHlines, “Refresh”. - verified The refresh token’s deadline is fixed at login, about 29 to 30 days, and a refresh doesn’t move it. Source:
refresh_token_expires_inacross three answers and a second login, “Refresh”. - verified A refresh token rotated away five minutes before still refreshed. Source: the restore step, “Refresh”.
- verified The placeholders appeared only where the proxy swaps them, and no real token went to Claude Code. Source: the full-request scan, “Placeholders and the real tokens”.
- verified With the login Keychain locked, Claude Code stored the login in plaintext in
~/.claude/.credentials.json, without a message. Source: “Without a Keychain”. - verified
/loginprinted the authorize URL with every login host refused, and didn’t send a request to one. Source: “The authorize URL without a network”. - verified The profile doesn’t allow a path on
platform.claude.comother than/v1/oauth/hello, so a guest’s code exchange to/v1/oauth/tokenis refused. Source: 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”. - inferred Claude Code wraps the URL across lines. The recording held it in three fragments of different lengths, which a terminal width cut would give.
- assumed That a rotated-away refresh token still works after more than five minutes. One check. A rerun of the restore step after a day would show it.
- assumed That a Pro or Max login behaves like the enterprise login measured. A rerun of
login.shwith such an account would show it. - assumed That Anthropic allows a tool other than Claude Code to run the login under Claude Code’s client ID. OpenShell waits for an approved client identity (X00-indexX00-index: SpikesThe open questions that must be answered by a throwaway prototype before work builds on them, in the order they are taken up.). Option B depends on it.
What this unblocks
Section titled “What this unblocks”- 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? closes with the decisions. Nothing else is blocked by it.
- I256I256 (closed): S14-claude-in-guest, S09-policy-credentials-audit: browser login decisions from B15-browser-loginSpec changes from the B15-browser-login decisions on #15 (2026-10-15). writes the decisions into S14-claude-in-guestS14-claude-in-guest: Claude Code in the GuestHow Claude Code gets into the guest image, which of the user's Claude Code configuration goes with it, how it starts, and the agent interface that keeps Claude Code's specifics in one place (V1-02-claude-only)., 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 S15-least-privilegeS15-least-privilege: Least Privilege on the HostThe security design for SEC12-least-privilege: which rights Wraith Box takes on the host, where credentials are held, and how each host process gets only the credentials it needs, for only as long as it needs them..
- 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). keeps the host-side login for after V1V1-initial: Initial versionThe first version: what it delivers, what it leaves out, and the milestones that get there..
- 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? keeps API key mode.
Details and glossary
Why the host must own the refresh. Each refresh returns a new refresh token. If the guest held the real one, and the host’s Claude Code or a second VM had the same login, whichever refreshed second would send a token the other had already used. With the proxy answering every refresh, there is one holder, and Claude Code in the guest only ever sees placeholders.
A leaked refresh token works for up to 30 days. Rotation doesn’t revoke the old refresh token, at least not within five minutes. A refresh token copied out of the secret store keeps working until the login’s deadline, about 30 days, or until someone revokes the login. /logout revokes through platform.claude.com/v1/oauth/token/revoke.
What the long-lived token lacks. The long-lived token from 2026-10-12 reached none of the organization’s plugin and skill paths that the browser login reached, so organization plugins and skills aren’t in the guest in V1V1-initial: Initial versionThe first version: what it delivers, what it leaves out, and the milestones that get there. either way, as S14-claude-in-guestS14-claude-in-guest: Claude Code in the GuestHow Claude Code gets into the guest image, which of the user's Claude Code configuration goes with it, how it starts, and the agent interface that keeps Claude Code's specifics in one place (V1-02-claude-only). already says for the plugin marketplace.
Glossary
- Access token: what Claude Code sends with each model request. It lasts 8 hours.
- Refresh token: what Claude Code trades for a new access token when the old one expires. It is the long-lived secret of a login.
- Rotation: a refresh returns a new refresh token as well.
- Authorize URL: the page where the user signs in. It ends with a code that the user pastes back into Claude Code.
- PKCE: a check that ties the code to the program that asked for it. Whoever holds both the code and the program’s secret verifier can redeem it.