Skip to content

feat(llc/adapters): subscription-mode adapters — run agents on Claude Max, Codex, or Copilot subscription without API key #9033

Description

@mrveiss

Summary

Many users pay for Claude Max, GitHub Copilot, or ChatGPT Plus subscriptions but do not have or want separate API keys. LLC agents should be able to run using subscription-authenticated CLI sessions rather than requiring per-token API billing.

What Users Want

  • LLC agent adapter type: claude_code_subscription — spawns a Claude Code session authenticated via browser OAuth (existing subscription), no ANTHROPIC_API_KEY needed
  • Same for codex_subscription (OpenAI Codex CLI with ChatGPT Plus OAuth)
  • Same for copilot_subscription (GitHub Copilot CLI with GitHub OAuth)
  • Token usage tracked via CLI stdout parsing (not API response headers)
  • Budget mode: token-count based (feat(llc/budget): token-based budget mode — track agent budgets in token counts alongside dollar amounts #8997) since dollar cost is zero for subscription tier
  • Clear error if subscription quota is exhausted: auto-pause agent, notify board

AutoBot Fit

Extends autobot-backend/llc/adapters/. The existing claude_code_adapter.py already spawns a Claude Code process — subscription mode is the same process but without injecting ANTHROPIC_API_KEY. Auth token is stored via OAuth browser flow → secrets system (SecretType.OAUTH_REFRESH_TOKEN per #9019). Session rotation on subscription limit hit instead of hard fail.

Acceptance Criteria

  • claude_code_subscription adapter type selectable on LLC agent
  • OAuth browser auth flow stores token via secrets system
  • Runs correctly without ANTHROPIC_API_KEY in environment
  • Token usage parsed from CLI output and reported
  • Quota exhaustion → agent auto-paused + board notification
  • Works alongside API-key adapters in the same company

Activity

  1. mrveiss commented on Jun 4, 2026

    @mrveiss
    OwnerAuthor

    ✅ Implementation complete

    Core subscription-mode adapters delivered in commit fd465e1:

    • ClaudeCodeSubscriptionAdapter — runs Claude Code CLI without API key
    • CopilotSubscriptionAdapter — runs GitHub Copilot via gh auth
    • CodexSubscriptionAdapter — stub (OpenAI CLI doesn't exist yet)
    • All registered, 10 tests passing

    Integration deferred (requires other systems):

    • OAuth browser flow → follow-up issue needed
    • Auto-pause on quota → blocked by GH#8225
    • Token usage tracking → follow-up issue needed

    PR: #9442 (needs rebase + review)

    Paperclip issue MVA-3105 closed.

  2. self-assigned this
    on Jun 4, 2026
  3. mrveiss commented on Jun 16, 2026

    @mrveiss
    OwnerAuthor

    AC audit (PR #10227): all three subscription adapters registered; API-key stripping ✅ (AC3), quota DETECTION ✅. Unmet: no frontend selector (AC1 → #10219), OAuth token wiring missing despite docstrings (AC2 → #10217), no token→budget reporting (AC4 → #10220), quota→auto-pause+board-notify is an explicit TODO (AC5 → #10218), and codex_subscription is a NotImplementedError stub. PR #10227 adds adapter_type hire-validation. Issue stays open pending #10217/#10218/#10219/#10220.

  4. mrveiss commented on Jun 20, 2026

    @mrveiss
    OwnerAuthor

    AC verification — now complete (recommend close).

    All ACs delivered across #10217/#10218/#10219/#10220. (codex_subscription remains a registered stub — surfaced as implemented=false in the selector.) Part of umbrella #9923.

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

Metadata

Metadata

Assignees

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions