Developer Tools•6 min read

Paying for Several Claude and ChatGPT Plans? Let the PlanSwap Sidebar Switch Accounts

Say you have a company Claude Max, a personal Claude Pro, and a ChatGPT Plus for Codex. PlanSwap shows what is left on each one and switches between them from a VS Code sidebar in WSL or on Windows, without signing out.

Written by N2NS Team
Published on 2026-09-26
Updated on 2026-10-11
Paying for Several Claude and ChatGPT Plans? Let the PlanSwap Sidebar Switch Accounts

Say you have three AI plans. Your company gives you Claude Max for work projects, and you pay for Claude Pro yourself for open source and side projects.

You also have ChatGPT Plus. You use Codex for code review, or as a fallback when your Claude quota runs out.

By default, Claude Code and Codex each read a single config directory. Changing accounts means signing out, signing back in, and authorizing again.

In WSL, the browser sign-in callback often fails, so you end up copying an authorization code and pasting it back into the terminal.

We built PlanSwap, a VS Code extension, for this setup. The sidebar has a Claude tab and a Codex tab, with one row per account showing its email, plan, and what is left of its usage limits.

Plans show up as Max 20x, Pro, or Plus. Click the switch icon on a row and new sessions use that account.

See What Is Left Before You Switch

Each account card shows what is left (or used) of its 5-hour and 7-day limits and when they reset. PlanSwap checks them automatically or when you click refresh.

The status bar sums it up, for example Claude 97% · Codex 82%, and turns yellow or red when a limit runs low.

When the current account's 5-hour or 7-day limit has 20% or less left, a notification tells you. The threshold is adjustable.

At that point a card above the list recommends the signed-in account with the most left, with its limits and how long ago they were checked. You can switch to it from the card, or open a terminal running the CLI as that account without switching.

If an account should never be suggested, such as your work account, exclude it from recommendations.

PlanSwap reads these limits through the official claude and codex CLIs. It never switches accounts on its own; you decide when to switch.

How Switching Works

Claude Code officially supports the CLAUDE_CONFIG_DIR environment variable. When it is set, credentials, settings, and session history live in that directory.

So one directory holds one signed-in account, and PlanSwap manages accounts on that basis.

The default account stays in ~/.claude, and other accounts go in ~/.claude-<name>. In the example above, the company Max lives in ~/.claude and your own Pro in ~/.claude-personal.

To switch, PlanSwap changes one entry: CLAUDE_CONFIG_DIR inside the official extension's claudeCode.environmentVariables setting.

The official extension reads that setting every time it starts a claude process, so new sessions pick up the new account right away without a restart.

Sessions that are already open keep the old account. A banner appears in the sidebar; click Reload Window and every panel starts over with the new account.

Codex works the same way with CODEX_HOME, using ~/.codex and ~/.codex-<name>.

Why PlanSwap Never Swaps Credential Files

A lot of account-switching scripts copy auth.json back and forth. We chose not to.

Codex refresh tokens are single use and rotate each time, and auth.json is not written atomically. If you keep an old copy and restore it a few days later, the token inside is likely no longer valid.

Signing in to a new account in the same CODEX_HOME also revokes the authorization of the account that was there before.

So PlanSwap doesn't touch credential contents. On the Claude side it only checks whether .credentials.json exists.

On the Codex side it reads auth.json and decodes the ID token payload locally to show the email and plan. Raw tokens are never logged, stored, or sent to the UI.

What a Codex Switch Costs

Switching Claude accounts costs almost nothing. Switching Codex accounts costs more.

The Codex backend reads CODEX_HOME once at startup and caches the credentials in memory. It doesn't watch the file and has no reload API, so the only way to change accounts is to restart it.

WSL remote windows add one more layer. The WSL server resolves the extension host's environment through a login shell, and it does this only once while the server process is running.

That means reloading the window doesn't help, and neither does restarting the extension host.

PlanSwap adds a small marked block to ~/.profile and ~/.bashrc that reads CODEX_HOME from a state file. Before writing it, a dialog shows you exactly what will be added.

When you switch, PlanSwap writes the state file first, then restarts the WSL server after you confirm.

Every WSL window disconnects at that point. Each one needs a Reload Window click to reconnect, and integrated terminals close.

We accept that cost, because dropping the connection once is safer than editing token files.

Native Windows has no login shell to hook, so there PlanSwap manages your user-level CODEX_HOME environment variable instead. After a switch, fully quit the editor and start it again from the Start menu or taskbar.

In VS Code in WSL, close all VS Code windows of that distribution, then reopen them. Save your work before switching Codex accounts either way.

To turn it off, run Codex Account: Disable Codex Account Switching. It removes the marker blocks and the state file (on Windows, the user-level CODEX_HOME).

Linked or Independent Accounts

More accounts also means more copies of CLAUDE.md, AGENTS.md, settings, skills, and history.

The global rules you wrote under the company account are empty when you switch to the personal one. You would have to copy them by hand and keep them in sync after every edit.

So when you add an account, PlanSwap asks how it should relate to the default one.

A linked account (the recommended choice) uses the default account's settings, rules, skills, history, and sessions through links. Only the sign-in is its own, so you can continue the same work with another account.

An independent account starts from a copy of the current settings and keeps its own history and sessions. That suits keeping work and personal apart.

You can change an account's mode later. After you change the default setup, Re-link in Tools checks linked accounts and offers Repair for what it finds. PlanSwap also runs this check in the background and tells you when something can be repaired.

On Windows, linking single files needs Developer Mode, and Codex thread databases stay per account.

Before You Install

PlanSwap is built for VS Code WSL remote windows and native Windows. Local Linux desktops and other remote windows work too. macOS is not supported.

It needs a VS Code 1.107+ compatible editor: VS Code, Antigravity IDE, or VSCodium.

Install the official Claude Code or Codex extension where the window runs (on the WSL side for a WSL window). Codex switching outside native Windows also requires Bash as the login shell.

Switching is not per window: other windows of the same editor switch too. Continuing another account's session can fail, especially between Codex accounts in different ChatGPT organizations.

Switching and usage limits have been tested end to end with real accounts only in Antigravity IDE in WSL and on native Windows.

When you run claude in a terminal with a non-default account, the /ide integration will likely fail to connect. The official panel in the sidebar is not affected.

This happens because the official extension looks for its lock files using only the extension host process's own environment variables.

Account management happens locally. PlanSwap has no telemetry and makes no network requests of its own, and sign-in and AI requests go through the official clients.

Search for PlanSwap in the Extensions view of a WSL window or a local Windows window to install it. The PlanSwap project page links to both the VS Code Marketplace and Open VSX, along with the current requirements and user guide.

For quota supplied by Antigravity IDE itself, rather than a Claude Code or Codex account, use the Antigravity quota and reset-time guide.

The source code and design docs are on GitHub under the MIT license.

PlanSwap is an independent community project and is not affiliated with, endorsed by, or sponsored by Anthropic or OpenAI.