Skip to content

docs: explain how to actually get a CLAUDE_CODE_OAUTH_TOKEN#19

Merged
archdex-art merged 1 commit into
mainfrom
docs/claude-subscription-setup-token
Jul 17, 2026
Merged

docs: explain how to actually get a CLAUDE_CODE_OAUTH_TOKEN#19
archdex-art merged 1 commit into
mainfrom
docs/claude-subscription-setup-token

Conversation

@archdex-art

Copy link
Copy Markdown
Owner

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-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.

  • Settings page: the "no usable Claude Code login" warning now includes the exact command 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).

Verification

Full suite 232/232, tsc --noEmit clean, lint baseline unchanged, next build clean.

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.
@archdex-art
archdex-art merged commit 0848615 into main Jul 17, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant