fix(coding-agent): default Claude OAuth to stored slots - #821
Open
lightofjeju wants to merge 1 commit into
Open
Conversation
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
oauth-slots, matching thequery-options default
/login claude-sdk-oauthaccounts usable without an additionaltokenInjectionsettingambientbehavior and the existing empty-pool ambientcompatibility fallback
Root cause
The provider had two conflicting defaults:
oauth-slotsambientAs a result,
/login claude-sdk-oauthsuccessfully stored an account, but thedefault request path bypassed that account and launched Claude Code without the
stored token.
Verification
npm test --prefix packages/coding-agent -- claude-sdk-oauthnpm run checknpm run buildtokenInjectionplus a stored account returned final assistant textQA_OK--helpexited 0git diff --check, and staged secret scan passedCompatibility and related work
This PR intentionally leaves the empty-pool ambient compatibility fallback
unchanged.
Open PRs #638 and #644 touch that empty-pool branch but do not conflict with
this PR's default-selection line. There is a semantic interaction if #638 lands:
default
oauth-slotsplus an empty-pool hard error would break users who onlyhave a Claude Code CLI login, while the current availability check can still
advertise that provider from ambient auth. Whichever change lands second should
either preserve the compatibility fallback or make the availability check
consult the resolved authentication lane.
Summary by cubic
Default the
claude-sdk-oauthprovider tooauth-slotsso/login claude-sdk-oauthaccounts (andCLAUDE_CODE_OAUTH_TOKENslots) are used without extra config, matching the query-options default. Explicitambientstill works and the empty-pool fallback to ambient remains; docs updated and regression tests added.Written for commit 3160b68. Summary will update on new commits.