ccherd
Run Claude Code subagents across several Claude accounts.
If you have more than one Claude subscription, each lives in its own
CLAUDE_CONFIG_DIR (~/.claude, ~/.claude-work, ...). Claude Code only sees
the sessions of the account it runs under, and a subagent always spends the
quota of its parent. ccherd fixes both:
- it lists and messages sessions across all your accounts, and
- it starts background subagents on the account whose weekly quota is most likely to expire unused, so you use what you pay for before paying extra.
macOS and Linux. Needs Python 3.10+ and the claude CLI.
Install
uv tool install ccherd
# or
pipx install ccherd
Setup
Run this inside the repo where you want to use ccherd:
ccherd setup
It asks:
- Whether each subscription already has its own config dir. If not, it asks
how many subscriptions you have, creates numbered dirs next to your current
one (
~/.claude,~/.claude-2, ...), prints the command to log in to each, and stops. Log in, then runccherd setupagain. - Which organization. If your dirs are logged in to more than one (say a private plan and a company team), ccherd uses one of them: subagents should run with the same skills and memories as their caller. Dirs of other organizations are left out, even if a pattern matches them.
- Which config dirs are your accounts. It lists every
~/.claude*dir. A numbered family like~/.claude-work,~/.claude-work2,~/.claude-work3gets one extra line: tick it to save the pattern, so~/.claude-work4is picked up later without running setup again. Or tick single dirs. Anything elsewhere goes into the "Other" line. - Where to put the Claude skill: in this repo (
.claude/skills/ccherd) or in every account's config dir. - Whether to add a short note to
CLAUDE.local.md. Creates the file if needed and adds it to.gitignore.
At the end it runs ccherd doctor.
Shared skills and memories
A subagent should behave like the session that started it. So all accounts
should share skills, projects (memories and conversations), agents,
plugins, settings.json and CLAUDE.md: one account holds them, the others
symlink to it. ccherd doctor shows what is linked; ccherd doctor --fix
links the rest. An account's own copy is merged into the shared one first;
files that differ stay in a *.ccherd-backup-* dir next to it. Nothing is
deleted.
Non-interactive: ccherd setup --new 3, or ccherd setup --organization "Acme" --schema ~/.claude-work --dir ~/.claude --skill repo --claude-local.
Config is stored in ~/.config/ccherd/config.json.
Commands
| Command | What it does |
|---|---|
ccherd setup |
Pick accounts, install the skill |
ccherd doctor |
Per account: login, organization, token, shared config |
ccherd doctor --fix |
Symlink every account's skills, memories etc. to one shared place |
ccherd accounts |
5-hour and weekly usage per account, and which one auto picks |
ccherd sessions |
Live Claude sessions of all accounts |
ccherd spawn NAME "task" --model M |
Start a background subagent on the best account |
ccherd agents |
Subagents started by the current session |
ccherd send TARGET "text" |
Message a subagent (resumes it if idle) or any live session |
ccherd result NAME |
A subagent's last answer |
ccherd log NAME |
A subagent's transcript |
ccherd kill NAME |
Stop a subagent |
spawn, agents, send, result, log and kill are meant to be run by
Claude from inside a session; the skill tells it how. A finished subagent
reports back to the session that started it as a message.
How auto picks an account
Score = weekly % left ÷ hours until the weekly reset × free share of the 5-hour window. The highest score wins. Accounts at ≥ 90 % of their 5-hour window or ≥ 98 % of their week are skipped.
ccherd never refreshes an OAuth token itself - the refresh token rotates, so
that would log out the Claude Code instance that owns the account. When an
access token has expired and no session runs on that account, it lets Claude
Code renew it (claude auth status).
Development
PYTHONPATH=src python3 -m unittest discover -s tests
License
MIT
Release files for ccherd 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| ccherd-0.1.0.tar.gz | 60.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| ccherd-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 100.7 kB
Release files / ccherd-0.1.0.tar.gz
| Download URL | ccherd-0.1.0.tar.gz |
|---|---|
| Size | 60.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d43f5eaa5e003ef1f4c8d8c2daf57490c3750bd4e4347c457669f3a61f55e078
|
|
BLAKE2b-256 checksum How to use checksums |
26fb77a9087e5b9a3e689c952aae79efb8fe9e237eadac1691096f7e0c096dfc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.19 {"installer":{"name":"uv","version":"0.12.19","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / ccherd-0.1.0-py3-none-any.whl
| Download URL | ccherd-0.1.0-py3-none-any.whl |
|---|---|
| Size | 40.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7d287686b0afe5ab12ffddc86f2f312b76b68865d05f4e9da7e192efb39b3b84
|
|
BLAKE2b-256 checksum How to use checksums |
cd21819d160c67bc7bfa61c052e70edec67ace14b93a71d435c6fe8ba465bfc6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.19 {"installer":{"name":"uv","version":"0.12.19","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|