Skip to content

Multi account support#111

Draft
remorses wants to merge 4 commits intonumman-ali:mainfrom
remorses:multi-account-support
Draft

Multi account support#111
remorses wants to merge 4 commits intonumman-ali:mainfrom
remorses:multi-account-support

Conversation

@remorses
Copy link

@remorses remorses commented Feb 6, 2026

Keeping this open for documentation purposes

tiltroom and others added 4 commits January 6, 2026 13:54
Implement multi-account management allowing users to authenticate multiple
ChatGPT accounts during initial OAuth flow and automatically rotate between
them when rate limits are encountered.

Key changes:
- Add AccountManager class for managing multiple accounts with rate limit tracking
- Extend OAuth flow to prompt for additional accounts (up to 10)
- Add persistent account storage in ~/.opencode/openai-codex-accounts.json
- Implement automatic account rotation on 429 responses
- Add CLI tool 'codex-accounts' for account management (add/list/remove)
- Add new types for multi-account support (ManagedAccount, AccountStorage, etc.)
- Add comprehensive test coverage for account management logic
- Add retry loop that actually retries with next account on 429 (was just switching for next request)
- Fix body parsing crash on non-string bodies (ReadableStream, ArrayBuffer, etc)
- Add mutex to prevent concurrent token refresh race conditions
- Fix addedAt field being overwritten with lastUsed on save
- Add MAX_RETRY_ATTEMPTS constant (3)
- Add tests for addedAt preservation
- Update README with multi-account documentation
- Rename package from opencode-openai-codex-auth to codex-multi-auth
- Update repo URLs to remorses/codex-multi-auth
- Reset version to 0.1.0
- Print OAuth URL instead of auto-opening browser
- Copy URL to clipboard on macOS via pbcopy
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.

2 participants