Skip to content
| Marketplace
Sign in
Visual Studio Code>AI>Codex Hub | Multi-AccountNew to Visual Studio Code? Get it now.
Codex Hub | Multi-Account

Codex Hub | Multi-Account

devhakeem5

|
1 install
| (0) | Free
Effortlessly manage and switch between multiple Codex accounts - never run out of credits again.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Codex Hub

Effortlessly manage and switch between multiple Codex accounts — never run out of credits again.

Codex Hub is a lightweight VS Code extension that lets you store multiple OpenAI Codex accounts and switch between them with a single click. No more logging in and out manually.

✨ Features

  • Multi-Account Storage — Securely store unlimited Codex accounts locally using VS Code's built-in globalState.
  • One-Click Switching — Inject any stored account into auth.json and reload to activate instantly.
  • Automatic Token Refresh — Expired access tokens are automatically refreshed via the OpenAI Auth0 endpoint before switching.
  • Bulk Refresh — Refresh all stored account tokens at once with a single button press.
  • Active Account Indicator — Clearly see which account is currently active with a visual badge.
  • Smart Add Account Flow — Leverages the official Codex extension's login flow; just click "Add Account", log in, and the new account is captured automatically.
  • Account Removal Protection — Cannot delete the currently active account; a warning is shown instead.
  • Full Theme Support — Seamlessly integrates with Light, Dark, and High Contrast VS Code themes.
  • Keyboard Accessible — Navigate accounts with arrow keys, manage modals with Escape/Enter/Tab.

📋 Requirements

  • VS Code 1.120.0 or later
  • Codex extension (openai.chatgpt) must be installed — Codex Hub uses its login flow.

🚀 Getting Started

  1. Install the Codex Hub extension.
  2. Click the Codex Hub icon in the Activity Bar (sidebar).
  3. Click Add Account — this will clear the current auth and reload VS Code.
  4. Log in via the official Codex login screen.
  5. Your account is automatically captured and stored.
  6. Repeat for additional accounts.
  7. Switch between accounts at any time!

🔧 How It Works

Codex Hub does not perform OAuth itself. Instead, it:

  1. Reads the auth.json file that the official Codex extension (codex.exe) creates.
  2. Stores a copy of each account's auth data in VS Code's globalState.
  3. When switching, writes the target account's data back into auth.json and reloads.

Token refresh is performed directly via https://auth.openai.com/oauth/token using the stored refresh_token.

📦 Commands

Command Description
Codex Hub: Add Account Start the add-account flow
Codex Hub: Refresh All Accounts Refresh tokens for all stored accounts

⚠️ Known Limitations

  • The extension requires the official Codex extension for login — it cannot authenticate independently.
  • After switching accounts, a window reload is required for the change to take effect.
  • Real-time rate limit information (messages remaining) is not available without codex.exe.

🔒 Security

  • All tokens are stored locally in VS Code's globalState — they never leave your machine.
  • No telemetry, analytics, or external data transmission.
  • The only external request is to auth.openai.com for token refresh (same endpoint Codex uses).

📄 License

MIT


Made with ❤️ by devhakeem5

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft