tcr

Run Claude Code and Codex across multiple accounts

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.

The newest TcrBar, a .dmg signed and notarized by Apple

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
  • Free for noncommercial use
  • No telemetry
  • Subscriptions, not API keys

How it works

Log in each account once, then start Claude Code through tcr

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.

  1. Add your accounts

    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
  2. Start the proxy

    It opens a live terminal dashboard. On a Mac, TcrBar can run it for you from the menu bar instead.

    $ tcr
  3. Run Claude Code through it

    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

Switch accounts without losing the 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-13

12.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 less

1 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 with cacheTtlRewrite

Why tcr

Built for when Claude Code hits its usage limit

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.

One proxy for every session

Each Claude Code session on the machine stays on its own account. You can add, disable or remove accounts while the proxy runs.

Claude Code and Codex

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.

See what it would have cost

TcrBar and the terminal dashboard show every window and every session. TcrBar also shows what the Claude traffic would have cost at list price.

Lend part of an account to another Mac

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.

Stays on your machine

No telemetry and no crash reporting. Your config, logs and tokens are files on your own disk.

Compare

Compared with claude-swap, ccs, teamclaude and others

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.

ToolHow it switchesHow it picks an accountKeeps each conversation on one accountAdded to a 2 MB requestRuns onLicense
tcrLocal proxy in the request pathEvery request, by what is left in the five-hour, weekly and per-model weekly windowsYes, always; moves only when that account cannot serve4 ms, 3 ms CPUmacOS, LinuxPolyForm Noncommercial
claude-swapSwaps Claude Code's stored login, for the whole machine or one terminalBy hand, next in turn, or automatically at a five-hour or seven-day thresholdPer terminal with cswap run; a switch moves the running session, which its README says rebuilds the cacheNot in the request pathmacOS, Linux, WindowsMIT
teamclaudeLocal proxy in the request pathRotates when the five-hour or weekly window reaches a threshold, and tracks the per-model weekly capOpt-in with distributeSessions, off by default44 ms, 13 ms CPUNode.js 20+MIT
ccsLaunches Claude Code with a chosen profile; account pools go through a local proxyProfile chosen at launch; the proxy rotates round-robin by default, or fills one account first with pool routing onOpt-in: pool routing holds a conversation on one account for up to an hour157 ms, 125 ms CPU, with an account poolmacOS, Linux, WindowsMIT
QuotiomacOS app that manages a local proxy (CLIProxyAPI)Round-robin or fill-firstNot stated in its README170 ms, 118 ms CPU, in its CLIProxyAPImacOS app; CLI on macOS and LinuxMIT
cuxSwaps the login, restarts Claude Code and resumes the conversationOn a rate limit by default, with optional five-hour and seven-day thresholdsNo: moving the conversation is how it worksNot in the request pathLinux, macOS, WindowsGPL-3.0
cc-account-switcherSwaps the stored login while Claude Code is closedBy handNot stated in its READMENot in the request pathmacOS, Linux, WSLMIT

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.

Measured: what each proxy costs

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.

Added latency, 2 MB request median
tcr4 ms
teamclaude44 ms
ccs157 ms
CLIProxyAPI170 ms
CPU time per 1,000 requests of 2 MB
tcr3.0 s
teamclaude12.8 s
CLIProxyAPI117.6 s
ccs124.9 s
Memory while serving 2 MB requests median peak
tcr80 MB
CLIProxyAPI172 MB
teamclaude395 MB
ccs601 MB
Memory at idle
tcr21 MB
CLIProxyAPI48 MB
teamclaude80 MB
ccs115 MB

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

Questions people ask first

How do I use Claude Code with more than one Claude account?

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.

Can I use Claude Code with several Max subscriptions?

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.

How do I switch between Codex accounts?

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.

Does switching accounts lose the prompt cache?

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.

How long does the cache stay warm?

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.

What happens when an account runs out?

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.

Does it run on Linux, and with API keys?

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.

Is tcr free?

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.

Does tcr send my data anywhere?

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.

Is it safe to run?

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.

Download TcrBar

Open the .dmg, drag TcrBar to Applications, and add your accounts from its panel. Look for it at the top right of the screen.

The newest TcrBar, a .dmg signed and notarized by Apple

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