Skip to content

Retire the Claude subscription OAuth path #3143

Closed

Description

@Joob1n

Goal

Retire the claude-subscription OAuth path.

Why

Anthropic's Consumer Terms do not permit it. §3, Use of Our Services, lists among the things a user may not do:

Except when you are accessing our Services via an Anthropic API Key or where we otherwise explicitly permit it, to access the Services through automated or non-human means, whether through a bot, script, or otherwise.

A Pro/Max subscription is a consumer Service. Maka drives it programmatically from its own runtime, not through an interface Anthropic provides, and not via an API key. The remaining door is "where we otherwise explicitly permit it" — which is what Claude Code has and Maka does not.

The impersonation is how the path clears that bar at all: it authenticates with the Claude Code client id, sends that client's User-Agent, injects a You are Claude Code system block ahead of the caller's own prompt, and synthesizes an x-anthropic-billing-header. The module was named for what it did — subscription-cloaked-request.

So the exposure is not Maka's alone. Every user who signs in this way is the party to that agreement, and their subscription is what is at risk.

Users keep Claude models through an Anthropic API key connection, which §3 names as the permitted path for programmatic access.

Reading of the published terms as of 2026-08-17, not legal advice — worth a maintainer or counsel confirming before this is cited as the reason.

Constraints worth knowing before starting

From the review on #2965 (closed, mine), which implemented this:

  • The provider type must stay registered. connection-catalog.json decodes with a plain .map() and decodeProviderType throws on an unregistered type, so removing it would fail the whole document — a workspace that ever signed in would lose every other connection with it. Keep the type, unwire it. gemini-cli is the existing shape.
  • Retired is not the same as unwired. Both look identical from runtimeAdapter: 'unavailable', but only one was ever available to a user. Today the detail page tells these users to "reauthorize under account connections" — whose only destination is the retirement notice — and deriveProviderAuthContract reads the provider as oauth_preview. An explicit retired marker on the registry entry fixes both and gives tests something to pin.
  • The credential outlives the retirement. With the logout channel gone, deleting the connection is the only way to clear the stored token, and nothing says so unless the copy does.
  • Bump RUNTIME_HOST_COMPATIBILITY_EPOCH. Narrowing OAUTH_LOGIN_PROVIDERS is a decode change in the new-Client-against-old-Host direction; this repo bumps for that class (fix(runtime-host): reject stale Hosts during startup #2633, feat(runtime-host): add trusted capability provider service #2625).
  • Gate the retired card on the catalog, not an env flag. The row belongs only to a workspace that actually enrolled.
  • The enforcement is thin. The unavailable adapter, the storage allow-list and the wire enum are each separately revertible with the suite green, which would let a retired provider become sendable again by accident. Those three need assertions.
  • request_authorization_code becomes unreachable once the provider goes, since Codex and xAI both enroll through device authorization. Probably its own follow-up.

Activity

  1. ARE404 commented on Aug 17, 2026

    @ARE404
    Contributor

    I’d like to take this. I’ll re-derive the retirement against current main, keeping the provider type registered so existing connection catalogs remain decodable while removing every login, refresh, request-cloaking, model-selection, and quota-fetch path. I’ll also preserve an explicit retired-provider state and credential-removal guidance, bump the Runtime Host compatibility epoch where the narrowed wire contract requires it, and add focused mutation-resistant contract tests. I will use the closed #2965 review as evidence, not copy it blindly. Codex is assisting with investigation and implementation; I will review the final diff and remain responsible for the contribution.

  2. Joob1n commented on Aug 17, 2026

    @Joob1n
    MemberAuthor

    Claiming this one.

    Intended shape, so it is visible before I start rather than argued about in review:

    • Keep the provider type registered and unwire the runtime adapter, following the gemini-cli precedent.
    • Carry retirement as an explicit fact on the registry entry rather than inferring it from an unavailable adapter, so the connection detail page and deriveProviderAuthContract can tell "taken away" from "not here yet". Both currently read the second.
    • Bump RUNTIME_HOST_COMPATIBILITY_EPOCH for the wire-enum narrowing.
    • Pin the few lines that actually enforce it — the unavailable adapter, the storage allow-list, the wire enum — since each is separately revertible with the suite staying green.

    Two things I would rather settle here than in a diff: whether the retired card should be gated on the catalog holding such a connection (my reading of what the deferred experimental flag was protecting), and whether the now-unreachable request_authorization_code chain comes out in the same change or a follow-up. Opinions welcome before I open anything.

  3. Joob1n commented on Aug 17, 2026

    @Joob1n
    MemberAuthor

    @ARE404 our comments crossed — I'd like to keep this one, if that's alright with you.

    Context for why: I filed this issue from the review on the closed #2965, which was my own attempt at the same retirement. The findings in the description are what that review surfaced over several rounds — the catalog-decodability constraint, retirement needing to be an explicit registry fact rather than an inference from an unavailable adapter, the epoch bump, and which specific lines turn out to be separately revertible with the suite green. I have the context loaded and a branch's worth of prior work to draw on.

    If you're keen on this area, #3142 is the sibling and is unclaimed by anyone but me — happy to hand that one over instead, or to have you review this when I open it. Either works.

  4. ARE404 commented on Aug 17, 2026

    @ARE404
    Contributor

    Of course — please keep #3143. Our comments crossed, and I’ll step back. On #3142: do you think there is a clean part that would be appropriate for me to take, or would you prefer to keep that one as a single whole too? After reading your follow-up, I think the Ledger and adapter changes may be more coherent if you implement them together, given the context you already have, and I’m completely happy with that. Either way, I’d be glad to help however is most useful — reviewing the PR, testing fixtures and imports, or taking a clearly separated follow-up.

  5. changed the title [-]Claude subscription OAuth authenticates as the Claude Code client[/-] [+]Retire the Claude subscription OAuth path[/+] on Aug 17, 2026
  6. added
    enhancement
    on Aug 20, 2026
  7. Joob1n commented on Aug 21, 2026

    @Joob1n
    MemberAuthor

    Done in #3183, which merged on 2026-08-21. Closing this now — it stayed open past the merge, which risks reading as still-to-do.

    Every constraint this issue recorded is in place on main:

    • The provider type stays registered. claude-subscription is still in PROVIDER_REGISTRY, so connection-catalog.json still decodes for a workspace that once enrolled. It is unwired, not removed.
    • An explicit retired: true marker, rather than inferring retirement from runtimeAdapter: 'unavailable' — the distinction this issue asked for between "retired" and "never available".
    • OAUTH_LOGIN_PROVIDERS narrowed to ['openai-codex', 'xai-oauth'].
    • RUNTIME_HOST_COMPATIBILITY_EPOCH bumped for that decode change.
    • The three separately-revertible enforcement points are pinned, which is the part this issue flagged as thin: provider-catalog-contract.test.ts asserts the retired set is exactly ['claude-subscription'], so the unavailable adapter, the storage allow-list and the wire enum can no longer drift back one at a time with the suite green.

    Two follow-ups came out of it rather than being dropped:

    The Consumer Terms reading in the description above was the reason given, and it is still worth a maintainer or counsel confirming before it is cited anywhere authoritative — closing this issue does not settle that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions