Skip to content

Per-user model subscriptions via OAuth connectors (Anthropic + OpenAI) - #155

Open
roham wants to merge 1 commit into
yc-software:mainfrom
roham:per-user-claude-oauth
Open

Per-user model subscriptions via OAuth connectors (Anthropic + OpenAI)#155
roham wants to merge 1 commit into
yc-software:mainfrom
roham:per-user-claude-oauth

Conversation

@roham

@roham roham commented Aug 3, 2026

Copy link
Copy Markdown

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 harness: supports subscription billing via CLAUDE_CODE_OAUTH_TOKEN passthrough to the Claude Code subprocess — but the token is sourced from core env, so exactly one subscription identity exists per deployment.
  • Codex harness: falls back to OPENAI_API_KEY because 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.

…+ 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
roham force-pushed the per-user-claude-oauth branch from 82c3b17 to a5107b5 Compare August 3, 2026 15:16
@roham roham changed the title Per-user Claude subscription auth via Anthropic OAuth connector Per-user model subscriptions via OAuth connectors (Anthropic + OpenAI) Aug 3, 2026
@16francej 16francej added adr Text proposal in adrs/ per CONTRIBUTING adr-looks-human ADR reads as human-written per guidelines enhancement New feature or request connector Proposes a new connector/surface/provider labels Aug 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

adr Text proposal in adrs/ per CONTRIBUTING adr-looks-human ADR reads as human-written per guidelines connector Proposes a new connector/surface/provider enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants