Skip to content

fix(coding-agent): default Claude OAuth to stored slots - #821

Open
lightofjeju wants to merge 1 commit into
code-yeongyu:mainfrom
lightofjeju:fix/claude-oauth-default-lane
Open

fix(coding-agent): default Claude OAuth to stored slots#821
lightofjeju wants to merge 1 commit into
code-yeongyu:mainfrom
lightofjeju:fix/claude-oauth-default-lane

Conversation

@lightofjeju

@lightofjeju lightofjeju commented Aug 11, 2026

Copy link
Copy Markdown

Summary

  • default the Claude SDK OAuth managed pool to oauth-slots, matching the
    query-options default
  • make /login claude-sdk-oauth accounts usable without an additional
    tokenInjection setting
  • preserve explicit ambient behavior and the existing empty-pool ambient
    compatibility fallback
  • align public provider docs and add deterministic regression coverage

Root cause

The provider had two conflicting defaults:

  • query options defaulted to oauth-slots
  • the managed auth pool defaulted to ambient

As a result, /login claude-sdk-oauth successfully stored an account, but the
default request path bypassed that account and launched Claude Code without the
stored token.

Verification

  • npm test --prefix packages/coding-agent -- claude-sdk-oauth
    • 43 files passed
    • 338 tests passed, 3 skipped
  • focused auth-lane/options/auth-status/regression suite
    • 4 files passed
    • 57 tests passed
  • npm run check
  • npm run build
  • Senpi QA harness:
    • common self-check 9/9
    • CLI smoke 8/8
    • mock loop 48/48 with zero real provider calls
  • built CLI QA:
    • omitted tokenInjection plus a stored account returned final assistant text
      QA_OK
    • invalid provider exited 1
    • --help exited 0
  • Biome, git diff --check, and staged secret scan passed

Compatibility 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-slots plus an empty-pool hard error would break users who only
have 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-oauth provider to oauth-slots so /login claude-sdk-oauth accounts (and CLAUDE_CODE_OAUTH_TOKEN slots) are used without extra config, matching the query-options default. Explicit ambient still 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.

Review in cubic

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