docs: explain how to actually get a CLAUDE_CODE_OAUTH_TOKEN#19
Merged
Conversation
Follow-up to the subscription-credential-check fix: the warning correctly
told users to "configure CLAUDE_CODE_OAUTH_TOKEN" but never explained how
to obtain one, leaving subscription-mode users stuck with no path
forward -- despite the feature being fully implemented and working once
that one env var is set.
Verified live: `claude setup-token` is a real, documented subcommand of
the official `@anthropic-ai/claude-code` CLI ("Set up a long-lived
authentication token (requires Claude subscription)", confirmed via
`npx @anthropic-ai/claude-code setup-token --help`). It runs on the
user's own machine (interactive browser login to their Claude Pro/Max/
Team account, with a manual URL/code fallback for headless/SSH use),
mints a token valid for 1 year, and instructs setting it as
CLAUDE_CODE_OAUTH_TOKEN -- exactly the env var CodeGraph's existing
claudeSubscriptionCredentialsAvailable() check already looks for.
No code change: the feature was already correct. This closes the actual
gap -- a user with a real Claude subscription had no way to discover the
one command that makes it work.
Changes:
- Settings page: the "no usable Claude Code login" warning now includes
the exact command (`npx @anthropic-ai/claude-code setup-token`) and a
concrete explanation of where the resulting token goes.
- DEPLOY.md: full 5-step walkthrough (run setup-token locally -> browser
login -> copy the 1-year token -> set CLAUDE_CODE_OAUTH_TOKEN on the
deployment -> redeploy) added to the Claude Agent SDK setup section.
Verification: full suite 232/232, tsc --noEmit clean, lint baseline
unchanged, next build clean.
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.
Gap
Follow-up to the subscription-credential-check fix (PR #17): the warning correctly told users to "configure CLAUDE_CODE_OAUTH_TOKEN" but never explained how to obtain one — leaving subscription-mode users stuck with no path forward, despite the feature being fully implemented and working once that one env var is set.
Fix (no code change — the feature was already correct)
Verified live:
claude setup-tokenis a real, documented subcommand of the official@anthropic-ai/claude-codeCLI ("Set up a long-lived authentication token (requires Claude subscription)", confirmed vianpx @anthropic-ai/claude-code setup-token --help). It runs on the user's own machine (interactive browser login to their Claude Pro/Max/Team account, with a manual URL/code fallback for headless/SSH use), mints a token valid for 1 year, and instructs setting it asCLAUDE_CODE_OAUTH_TOKEN— exactly the env var CodeGraph's existingclaudeSubscriptionCredentialsAvailable()check already looks for.setup-tokenlocally → browser login → copy the 1-year token → setCLAUDE_CODE_OAUTH_TOKENon the deployment → redeploy).Verification
Full suite 232/232,
tsc --noEmitclean, lint baseline unchanged,next buildclean.