Repository navigation
docs(claude-code): describe sandbox OAuth token as optional - #163
Merged
Merged
Conversation
The sandbox devcontainer.json labelled CLAUDE_CODE_OAUTH_TOKEN as
Required, but both variants mount the same claude-config volume at
/home/node/.claude, so signing in once in the default variant already
authenticates the sandbox. The token is only needed for standalone
sandbox use. Re-describe it as optional, note that ${localEnv:} yields
an empty string when the host var is unset, and lead the README's
Sandbox Authentication section with the shared-volume path.
Part 2 of the issue (remoteEnv + firewall allowlist for token-bearing
MCP plugins) is left for a separate change.
Refs #118
gatezh
added a commit
that referenced
this pull request
Sep 23, 2026
Missed by #163: the variant summary still said the token must be injected from the host.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Changes how the sandbox's
CLAUDE_CODE_OAUTH_TOKENinjection is described, from "Required" to optional, and reorders the README's Sandbox Authentication section to lead with the usual path.Why
Both template variants mount the same
myproject-claude-config-${localWorkspaceFolderBasename}volume at/home/node/.claude. Signing in once in the default variant therefore already authenticates the sandbox. The token is only needed when the sandbox is used standalone. Calling it "Required", combined with${localEnv:}silently injecting""when the host var is unset, led a downstream project to carry an unused token for months (#118 Part 1).Changes
claude-code/.devcontainer/claude-sandbox/devcontainer.json: rewrote the comment aboveCLAUDE_CODE_OAUTH_TOKEN(optional, shared-volume path, resolves to""when unset). The mechanism itself is unchanged.claude-code/README.md"Sandbox Authentication": now leads with "sign in once in the default variant", scopes theclaude setup-tokenflow to standalone sandbox use, and explains the empty-string case.Notes
remoteEnvforGITHUB_PERSONAL_ACCESS_TOKEN, plus allowlistingapi.githubcopilot.com,mcp.linear.appandmcp.resend.comin the sandbox firewall. Widening the firewall is a security-policy decision for the maintainer, so the issue should stay open for it.Refs #118