feat: add Claude CLI OAuth support for subscription accounts#249
Open
wade56754 wants to merge 2 commits intoop7418:mainfrom
Open
feat: add Claude CLI OAuth support for subscription accounts#249wade56754 wants to merge 2 commits intoop7418:mainfrom
wade56754 wants to merge 2 commits intoop7418:mainfrom
Conversation
…/Team) Users with Anthropic Pro/Max/Team subscriptions can now use CodePilot without an API key by selecting the new "Claude CLI (Subscription)" provider. This leverages Claude CLI's built-in OAuth tokens stored in ~/.claude/. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
Someone is attempting to deploy a commit to the op7418's projects Team on Vercel. A member of the Team first needs to authorize it. |
- Reorder Claude CLI candidate paths: user directories (~/.npm-global, ~/.bun) now take priority over system paths (/usr/local/bin) to avoid picking up stale system-wide installations - Add instrumentation.ts with undici EnvHttpProxyAgent so server-side fetch calls (Telegram Bridge, etc.) respect HTTP_PROXY env vars Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.
Summary
~/.claude/— users just need to runclaude loginfirstcli_oauthauth style clears allANTHROPIC_*env vars so the Claude CLI subprocess falls back to its own OAuth flowProblem
Currently CodePilot requires either an API key or a third-party provider configuration. Users with Anthropic Pro/Max/Team subscriptions who have already authenticated via
claude logincannot use their subscription — they get "Claude Code process exited with error" because no credentials are injected.Changes
provider-catalog.tscli_oauthAuthStyle + vendor preset definitionprovider-resolver.tstoClaudeCodeEnv()cli_oauth branch: clears ANTHROPIC_* vars, lets CLI use own OAuthprovider-resolver.tshasCredentialsreturns true for cli_oauthprovider-resolver.tsinferAuthStyleFromProviderreads__AUTH_STYLEmarker from env_overridesprovider-presets.tsxPresetConnectDialog.tsx__AUTH_STYLEmarker for cli-oauth presetHow it works
env_overrides_json: {"__AUTH_STYLE":"cli_oauth"}toClaudeCodeEnv()detects cli_oauth → clears all ANTHROPIC_* env vars~/.claude/Test plan
npm run typecheck— passesnpm run test:unit— 374 tests pass, 0 fail (including 82 provider-resolver tests)🤖 Generated with Claude Code