Skip to content

Subscription auth: Codex ChatGPT OAuth + harness-carried model auth (supersedes #126, #128) - #690

Draft
ReganBell wants to merge 30 commits into
mainfrom
subscription-auth
Draft

Subscription auth: Codex ChatGPT OAuth + harness-carried model auth (supersedes #126, #128)#690
ReganBell wants to merge 30 commits into
mainfrom
subscription-auth

Conversation

@ReganBell

@ReganBell ReganBell commented Aug 26, 2026

Copy link
Copy Markdown
Collaborator

Adds subscription-backed Codex auth and recognizes harness-carried credentials without treating them as general provider API keys.

  • verification: npm run typecheck
  • verification: formatting and focused lint
  • verification: 111 focused core tests
  • verification: 4 CLI regression tests

open-swe and others added 28 commits August 2, 2026 21:12
…oarding

Under HARNESS=claude with only CLAUDE_CODE_OAUTH_TOKEN (or ANTHROPIC_AUTH_TOKEN),
turns work but the deployment reported itself unconfigured: surface-config's
modelProviderConfigured only consulted the credential store, and the admin
onboarding badge said 'Needs a key'.

harnessCarriedModelAuth(config) names the provider a harness authenticates on
its own (claude -> anthropic via OAuth/auth token, codex -> openai via
CODEX_ACCESS_TOKEN). It is OR'd into modelProviderConfigured and exposed to the
admin as a sibling harnessAuth field on GET /v1/admin/model-providers. The
credential-store statuses stay untouched: anthropic still reports absent,
because those keys feed pi-transport calls and deleting or adding them is
independent of harness OAuth.
Co-Authored-By: QM <qm@ycombinator.com>
@odfalik

odfalik commented Aug 27, 2026

Copy link
Copy Markdown

will this have the same limitation as the claude subscription setup where the web ui will be broken still?

Copy link
Copy Markdown
Collaborator

Could you elaborate

@ReganBell
ReganBell marked this pull request as draft August 27, 2026 22:03
Invert PR 690's auth flow: the subscription login is a per-user keychain
credential, core is the single custodian and refresher, and harnesses
receive derived ephemeral material at spawn (Codex: minimal auth.json
without the refresh token; Claude: injected env token).

- CodexAuthStore abstraction: keychainCodexAuthStore (production,
  CODEX_AUTH_CREDENTIAL) and fileCodexAuthStore (local dev, CODEX_AUTH_FILE),
  both with central refresh and single-flight rotation
- claude harness authEnv hook + keychainHarnessAuthEnv (CLAUDE_AUTH_CREDENTIAL)
- child auth.json never carries the refresh token; no sync-back path,
  so the lock-file persistence machinery and JWKS re-verification are gone
- production ban now applies only to the file path; keychain path is the
  supported production route
@odfalik

odfalik commented Aug 28, 2026

Copy link
Copy Markdown

Could you elaborate

as of release 0.15 when you use a claude subscription with pi, the web ui is unusable, it boots you to the onboarding flow

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.

7 participants