Repository navigation
docs(setup): add a Claude subscription (claude setup-token) credential path - #1940
Conversation
…l path hyperloom-setup only ever wrote ANTHROPIC_API_KEY, although the runtime accepts CLAUDE_CODE_OAUTH_TOKEN and its own error text points subscription users at `claude setup-token`. A subscription user had no documented path, and the obvious one (fill the token next to the API-key placeholder) made the key outrank the token. Setup now asks first whether to use an API key or a Claude subscription. The subscription path tells the user to run `claude setup-token` in their own terminal, writes CLAUDE_CODE_OAUTH_TOKEN instead of the API-key placeholder, pins the official endpoint the token is valid for, and validates that no ANTHROPIC_API_KEY / ANTHROPIC_AUTH_TOKEN shadows it. Fixes #1935 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HktBcjPwjE7QgkA8MgKH6q
Code metrics gate: PASSEDJudged: the 2 files this change touches. Files it does not touch never fail it; anything found there is listed under Outside this change for information.
97 findings in files this change does not touchOutside this change (informational): 97
...and 72 more; the job log lists every row.
Thresholds and sources: |
PR #1940 -- docs(setup): add a Claude subscription (claude setup-token) credential pathWhat it does: the Blocking issues: none Checked: skills/hyperloom-setup/SKILL.md (both paths, the LGTM |
hyperloom-setupnow asks how Hyperloom authenticates to Claude before anything else:Anthropic API key(unchanged flow: base URL question,ANTHROPIC_API_KEYplaceholder, AMD APIM header) orClaude subscription (Pro/Max). The subscription path:claude setup-tokenin their own terminal (it needs a browser round-trip, so the agent must not run it from a non-interactive shell) and paste thesk-ant-oat01-…token into.env, never chat;CLAUDE_CODE_OAUTH_TOKEN=<PLEASE_FILL_IN>instead of theANTHROPIC_API_KEYplaceholder;ANTHROPIC_BASE_URL=https://api.anthropic.comwithout asking (the token is valid nowhere else; never paired with the AMD gateway);ANTHROPIC_API_KEYnorANTHROPIC_AUTH_TOKENis set, since either outranks the token (ANTHROPIC_SYNTHESIZABLE_KEY_ENVS), and asks before removing an existing non-placeholder key.test_setup_skill_offers_the_claude_subscription_token_pathintest_dotenv_precedence_recipes.py(the file that already pins the setup skill's recipes). It derives the shadowing variables fromllm_config.ANTHROPIC_SYNTHESIZABLE_KEY_ENVS, so the skill cannot drift from the runtime's precedence. Fails without the skill change; file: 101 passed.ruffclean;code-metricsPASSED.End-to-end: this exact path (token-only
.env, official URL, docker mode) was used for an 8 h GLM-5.2 MXFP4 session; with the OAuth-only (CLAUDE_CODE_OAUTH_TOKEN) launch always fails: critic preflight calls ClaudeOneShotClient.messages inside asyncio.run #1929 fix (fix(cli): run model preflight off the event loop so an OAuth-only launch starts #1937) it ran to completion on subscription auth.🤖 Generated with Claude Code