Per-user model subscriptions via OAuth connectors (Anthropic + OpenAI) - #155
Open
roham wants to merge 1 commit into
Open
Per-user model subscriptions via OAuth connectors (Anthropic + OpenAI)#155roham wants to merge 1 commit into
roham wants to merge 1 commit into
Conversation
…+ OpenAI) Both subscription-capable harnesses are org-centralized today: the Claude harness sources CLAUDE_CODE_OAUTH_TOKEN from core env (one subscription identity per deployment), and the Codex harness falls back to OPENAI_API_KEY because its CLI cannot do browser OAuth in a container. Organizations whose employees already hold individual Claude Pro/Max and ChatGPT Plus/Pro seats need per-scope OAuth via the keychain, resolving tokens per user with fallback to the org defaults.
roham
force-pushed
the
per-user-claude-oauth
branch
from
August 3, 2026 15:16
82c3b17 to
a5107b5
Compare
iqbalbhatti49
approved these changes
Aug 4, 2026
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.
What this is
A feature request contributed as an ADR per CONTRIBUTING.md, with implementation pointers from reading the source.
Summary
Both subscription-capable harnesses are org-centralized today:
CLAUDE_CODE_OAUTH_TOKENpassthrough to the Claude Code subprocess — but the token is sourced from core env, so exactly one subscription identity exists per deployment.OPENAI_API_KEYbecause the Codex CLI cannot do browser OAuth in a container; ChatGPT subscriptions authenticate via OAuth, so per-user OpenAI subscriptions are unreachable the same way.Organizations whose employees already pay for individual Claude Pro/Max and ChatGPT Plus/Pro seats get two bad options: share one person's subscription (rate limits included) org-wide, or buy API credits for usage employees already have.
Ask
Make Anthropic and OpenAI first-class keychain connectors alongside the existing seven (Google, Slack, Notion, Linear, Dropbox, GitHub, X): user completes the provider's OAuth flow from the keychain page, the scoped token lands in the existing encrypted credential store, and each harness resolves its subscription credential per-scope with fallback to the core-env token / base-model key. Org defaults remain for scopes without a connected subscription.
The ADR notes why this looks architecturally consistent — per-scope credential storage, grant-scoped sandbox env injection, and user-initiated OAuth flows all exist today.
Happy to test against a live team deployment.