Chooses by quota, not by turn
It reads the five-hour, weekly and per-model weekly window on every account, and spends first the quota that resets soonest, so less of it expires unused.
tcr is a local proxy for Claude Code and Codex. It sends each request to the account with quota left, and keeps every conversation on the account that already holds its prompt cache. TcrBar, a menu-bar app for macOS, shows every account.
Or install from the terminal, on macOS or Linux
$ curl --proto '=https' --tlsv1.2 -LsSf https://raw.githubusercontent.com/dhkts1/tcr/main/install.sh | sh
$184 today · cache 96%
Codex 1.4M tokens
How it works
Every request goes through the proxy on your own machine, which picks an account from the pool. Claude Code keeps one setup and never needs to know there is more than one account.
Sign in through the browser, once per account. Already logged in to Claude Code? The first run imports that login, and Claude Code asks you to sign in once more.
$ tcr login $ tcr login --codex # for codex
It opens a live terminal dashboard. On a Mac, TcrBar can run it for you from the menu bar instead.
$ tcr
tcr run starts Claude Code pointed at the proxy. tcr setup shell makes a plain claude do the same.
$ tcr run $ tcr run --codex # codex
What step 2 opens: the terminal dashboard, with every account's windows and why it is out, the session tree and the request log. It runs on macOS and Linux. This frame is tcr demo, which draws the real dashboard against fake accounts and contacts nothing.
Prompt cache
Anthropic keeps the prompt cache per account. A conversation that moves to another account arrives cold and writes its whole cached prefix again. So tcr keeps each conversation on one account, and moves it only when that account cannot serve the request.
97.6%
of prompt tokens were read from cache over 30 days of the author's own traffic.
30 days ending 2026-10-1312.5×
the warm price, at least: what the first request after a move pays for its cached prefix. On Opus 5.5 it is 25 times.
At API list price: a cache write is 1.25× input (2× for the one-hour cache), a read 0.1× or less1 hour
how long the cache stays warm, instead of five minutes. On a subscription the hour costs the five-hour window what five minutes does.
Quota cost measured 2026-10-06. Turn it off withcacheTtlRewrite
The same cached prefix, at API list price
Why tcr
It reads the five-hour, weekly and per-model weekly window on every account, and spends first the quota that resets soonest, so less of it expires unused.
Each Claude Code session on the machine stays on its own account. You can add, disable or remove accounts while the proxy runs.
Point Claude Code, OpenAI's codex CLI, or a tool built on them such as OpenClaw at the same proxy. Each provider gets its own pool.
TcrBar and the terminal dashboard show every window and every session. TcrBar also shows what the Claude traffic would have cost at list price.
Pair two Macs by comparing the same six digits on both screens, then lend up to half of a window. A borrowed request is served from the lender's own account, so the borrower's credential never leaves the borrower's Mac. Off by default.
No telemetry and no crash reporting. Your config, logs and tokens are files on your own disk.
Compare
Several tools let Claude Code use more than one account. A proxy in the request path chooses an account for every request, while a switcher changes which login Claude Code itself holds.
| Tool | How it switches | How it picks an account | Keeps each conversation on one account | Added to a 2 MB request | Runs on | License |
|---|---|---|---|---|---|---|
| tcr | Local proxy in the request path | Every request, by what is left in the five-hour, weekly and per-model weekly windows | Yes, always; moves only when that account cannot serve | 4 ms, 3 ms CPU | macOS, Linux | PolyForm Noncommercial |
| claude-swap | Swaps Claude Code's stored login, for the whole machine or one terminal | By hand, next in turn, or automatically at a five-hour or seven-day threshold | Per terminal with cswap run; a switch moves the running session, which its README says rebuilds the cache | Not in the request path | macOS, Linux, Windows | MIT |
| teamclaude | Local proxy in the request path | Rotates when the five-hour or weekly window reaches a threshold, and tracks the per-model weekly cap | Opt-in with distributeSessions, off by default | 44 ms, 13 ms CPU | Node.js 20+ | MIT |
| ccs | Launches Claude Code with a chosen profile; account pools go through a local proxy | Profile chosen at launch; the proxy rotates round-robin by default, or fills one account first with pool routing on | Opt-in: pool routing holds a conversation on one account for up to an hour | 157 ms, 125 ms CPU, with an account pool | macOS, Linux, Windows | MIT |
| Quotio | macOS app that manages a local proxy (CLIProxyAPI) | Round-robin or fill-first | Not stated in its README | 170 ms, 118 ms CPU, in its CLIProxyAPI | macOS app; CLI on macOS and Linux | MIT |
| cux | Swaps the login, restarts Claude Code and resumes the conversation | On a rate limit by default, with optional five-hour and seven-day thresholds | No: moving the conversation is how it works | Not in the request path | Linux, macOS, Windows | GPL-3.0 |
| cc-account-switcher | Swaps the stored login while Claude Code is closed | By hand | Not stated in its README | Not in the request path | macOS, Linux, WSL | MIT |
Each row comes from that project's own README and docs, read on 2026-10-13. "Not stated" means its README does not say, not that the tool cannot. The "added" column is measured; how is below.
On a 2 MB request, tcr adds 4 ms. The other proxies add 44 to 170 ms and use 4 to 42 times the CPU. Long Claude Code conversations send requests of several megabytes, and every one of them pays this.
Where they tie. With a 10 KB request every proxy adds under 4 ms at the median, and tcr and CLIProxyAPI start up in about the same time. claude-swap, cux and cc-account-switcher add nothing per request because they are not in the request path; their cost comes at each switch, when the conversation's cached prefix is written again.
How it was measured. 2026-10-20, on one 14-core Apple silicon Mac: tcr 1.2.14, teamclaude 1.1.25, CLIProxyAPI 8.0.35 (the proxy Quotio runs) and ccs 8.10.0 with its account pool, each against the same local stand-in for Anthropic's API, 2,400 streamed requests per tool and size, every response checked. The machine was busy (load average 136 to 232), so read the latency as an order rather than an exact figure; CPU agreed within 4% across two passes and memory within about 15%. CLIProxyAPI ran with API keys aimed at the stand-in, because its Claude logins cannot be pointed at another host.
Another tool fits better if you need Windows (claude-swap, ccs, cux), want Gemini or other providers behind the same tool (teamclaude, ccs, Quotio), want no proxy in the request path (claude-swap, cux, cc-account-switcher), or need an open-source license for commercial use (every other row). Moving from claude-swap, Quotio, ccs or CLIProxyAPI? tcr import lists the logins they hold.
FAQ
Install tcr, run tcr login once for each account, start the proxy with tcr (or let TcrBar run it), and launch Claude Code with tcr run. Every request then goes through the proxy, which picks an account from the pool. If you are already logged in to Claude Code, the first run imports that login, so you only log in to the others. Claude Code then asks you to sign in once more, because a refresh token works only once.
Claude Code has its own answer: CLAUDE_CONFIG_DIR moves its configuration directory, and Anthropic's docs suggest it for running accounts side by side. There you pick the account by picking the directory when you start a session. tcr keeps one Claude Code setup and picks the account for every request instead. It imports Claude Code's default login and does not read CLAUDE_CONFIG_DIR.
Yes. Each subscription is one account in the pool: run tcr login once for each. tcr reads every account's five-hour, weekly and per-model weekly windows, and sends each request to one that has quota left.
You stop switching by hand. A Codex account is the ChatGPT login codex uses. Sign each one in with tcr login --codex, or import the one codex already has with tcr login --from-codex, then start codex with tcr run --codex. Codex accounts are picked, refreshed and checked for quota the same way Claude accounts are, and a Codex request is only ever served by a Codex account.
Yes. Anthropic keeps the prompt cache per account, so a conversation that moves arrives cold and writes its whole cached prefix again. A cache write bills at 1.25 times the input price and a cache read at a tenth of it or less, so the first request after a move pays at least 12.5 times as much for that prefix (25 times on Opus 5.5).
That is why tcr keeps each conversation on one account, even past the point where it would send new conversations elsewhere. tcr saves which account each conversation is on, so a restart keeps that for conversations still within the cache lifetime.
Five minutes after its last use, unless the request asks for an hour. From 1.1.19 tcr asks for the one-hour cache on every Claude request, so a conversation you come back to within the hour resumes warm. On a subscription the hour costs the five-hour window what five minutes does (measured 2026-10-06). cacheTtlRewrite turns it off.
New conversations skip any account that is close to a limit, on a rate-limit hold, or out of the model window a request needs, and go to the account the quota rules pick next. A conversation already on that account moves once, and pays one cache rebuild.
The tcr CLI and terminal dashboard run on Linux as static builds for x86_64 and aarch64. TcrBar, the menu-bar app, is macOS only.
Accounts are Claude subscriptions logged in through the browser, or Codex accounts. tcr does not serve Anthropic API keys, and refuses a Codex login made with an API key too.
Yes, for noncommercial use. tcr is source-available under the PolyForm Noncommercial License 1.0.0, which is not an open-source license. If you need an open-source license for commercial use, the comparison above lists the tools that have one.
No telemetry and no crash reporting. Your config, logs and tokens are files on your own disk. tcr calls Anthropic on your behalf (and OpenAI, for Codex accounts) and GitHub to check for a newer version. If you turn on peers, it also talks to the other Macs you trust, and a Mac that lends you an account sees the requests it serves for you.
tcr holds your account tokens, so get it from the release page or the install script, never a copy repackaged elsewhere. Each CLI archive has a .sha256 file beside it, and TcrBar is signed with a Developer ID certificate and notarized by Apple.
It listens only on 127.0.0.1, but every process and container on the machine can reach that address, and by default nothing asks it for a key. Read the security notes before you run it.
Open the .dmg, drag TcrBar to Applications, and add your accounts from its panel. Look for it at the top right of the screen.
Or install from the terminal, on macOS or Linux. The script installs the tcr CLI, and on a Mac also installs TcrBar and opens it.
$ curl --proto '=https' --tlsv1.2 -LsSf https://raw.githubusercontent.com/dhkts1/tcr/main/install.sh | sh