Skip to content

feat: multiple subscription support - #917

Open
rayliverified wants to merge 3 commits into
craft-ai-agents:mainfrom
rayliverified:feat/multiple-subscriptions
Open

feat: multiple subscription support#917
rayliverified wants to merge 3 commits into
craft-ai-agents:mainfrom
rayliverified:feat/multiple-subscriptions

Conversation

@rayliverified

@rayliverified rayliverified commented Jun 23, 2026

Copy link
Copy Markdown

Add support for using multiple Claude Code or Codex subscriptions. This helps users avoid having to log out and log in to different accounts. Currently, Craft Agents has built in support for multiple providers, using different slugs. This PR builds on top of that and adds:

  • UI support for adding another OAuth sub.
  • Model picker support.
  • Automatic fallback for multi provider when rate limits are reached on one subscription.
Screenshot 2026-06-23 at 1 29 42 PM image image

Summary

Add support for multiple Claude Max, ChatGPT Plus, or Copilot accounts.

Co-Authored-By: Craft Agent agents-noreply@craft.do

rayliverified and others added 3 commits June 23, 2026 14:17
…T Plus, or Copilot accounts

- Settings: simple '+ Add Connection' button (no provider picker dropdown)
- Connection rows show OAuth identity (email · org) with expiration status inline
- Per-connection OAuth token storage with legacy credential fallback migration
- Per-connection refresh mutex (was single global mutex)
- OAuth status in LIST_WITH_STATUS handler (expiresAt, timeRemaining, refreshError)
- Rate-limit failover: auto-switch to another compatible OAuth connection on 429
- Unique slug generation for duplicate connection names (e.g. claude-max-2)
- Connection identity labels in model picker (email · org subtitle)
- 4 new i18n keys (addAnotherSubscription, oauthExpired, oauthExpiresIn, oauthRefreshFailed)
- Dev launch script (electron-dev-local.sh)

Co-Authored-By: Craft Agent <agents-noreply@craft.do>
- Add parseChatGptIdToken() to decode JWT id_token claims (email, org)
- Stamp identity onto connection in chatgpt:completeOAuth handler
- Fetch GitHub user info after Copilot device code flow for identity
- Lazy migration in LIST_WITH_STATUS: backfill identity for existing
  ChatGPT connections that have stored idToken but no oauthAccountEmail

Co-Authored-By: Craft Agent <agents-noreply@craft.do>
Co-Authored-By: Craft Agent <agents-noreply@craft.do>
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