Skip to content

feat: Claude and ChatGPT subscriptions through the installed CLIs - #14

Merged
3ae3ae merged 1 commit into
general-clifrom
wp/subscriptions
Oct 19, 2026
Merged

3ae3ae merged 1 commit into
general-clifrom
wp/subscriptions

Conversation

@3ae3ae

@3ae3ae 3ae3ae commented Oct 19, 2026

Copy link
Copy Markdown
Owner

Summary

  • New built-in providers claude-login and chatgpt-login. They use the login your installed claude / codex already has, so a subscription works without an API key.
    • claude-login: the user's own config dir is kept, plus --setting-sources project,local --strict-mcp-config --no-session-persistence. API-key, Bedrock and Vertex variables are stripped so the CLI uses its own login; CLAUDE_CODE_OAUTH_TOKEN is passed through if set.
    • chatgpt-login: the user's own CODEX_HOME is kept, plus --ignore-user-config --ignore-rules. Model and effort are passed as -m / -c.
    • These flags keep the user's personal settings out of the runs. I checked this on this machine with a local capture server, without model calls: personal CLAUDE.md, skills and Codex config.toml do not reach the request.
  • Known leak, reported by doctor. A non-empty global Codex AGENTS.md is still sent by Codex; doctor says so when it applies.
  • Isolation unchanged for API keys. API-key providers keep fully isolated per-run config dirs.
  • doctor login checks. It runs claude auth status / codex login status, and rejects a login provider on a CLI that cannot use it (OpenCode channel, bridge).
  • Usage limits. Hitting a provider's usage limit raises Stopped("usage_limit") and discards the interrupted rollout instead of recording failed work. The run exits 4 and the same command resumes later.
  • Worktree cleanup. git worktree prune runs before creating project worktrees, so killed runs leave nothing behind.

Test plan

  • 132 core tests (15 new) and 13 plugin tests pass.
  • Argv/env captures for both login providers, as executor and as improver: no CLAUDE_CONFIG_DIR/CODEX_HOME override, the new flags, stripped API keys, kept OAuth token.
  • Usage-limit stop and resume, for an executor and for an improver.
  • Doctor with fake auth status / login status.
  • ruff
  • A live subscription run.

🤖 Generated with Claude Code

Two built-in providers, claude-login and chatgpt-login, use the login
the installed `claude` / `codex` already has, so a Claude or ChatGPT
subscription works without an API key:

- claude-login keeps the user's own config dir (where the login lives)
  and adds --setting-sources project,local, --strict-mcp-config and
  --no-session-persistence, so personal CLAUDE.md, skills, plugins, MCP
  servers and session history stay out of the runs;
- chatgpt-login keeps the user's own CODEX_HOME and adds
  --ignore-user-config and --ignore-rules (doctor notes when a global
  AGENTS.md is still part of every Codex run).

API-key providers keep their fully isolated per-run config dirs. Doctor
checks `claude auth status` / `codex login status` and rejects a login
provider on a CLI that cannot use it.

Hitting a provider's usage limit now stops the run cleanly instead of
recording failed work: the interrupted rollout is discarded and the
same command resumes later. Project worktrees left by killed runs are
pruned before new ones are created.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@3ae3ae
3ae3ae merged commit 2fbae48 into general-cli Oct 19, 2026
@3ae3ae
3ae3ae deleted the wp/subscriptions branch October 19, 2026 13:21
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.

1 participant