Your agent hits the limit. The next one keeps your place.
Leg runs Claude Code, Codex and agy. It watches the five-hour and weekly windows, and at the wall it saves the session, stops the agent, and starts your next option in the same terminal, from where the last one stopped. Nothing is retyped.
npm install -g legclipip install -U context-handoff-bundleThen type leg claude where you would have typed claude. Same session, same flags.
Node 22 or newer. Zero runtime dependencies. $79 once, with 30 days to ask for your money back. Binds 127.0.0.1 and leaves your settings files alone.
The handoff, as it happens in the terminal.
A sample session. Every line that begins with [leg] is what Leg prints; the rest is the agent. It plays at reading speed when it scrolls into view.
git diff --stat, dirty files, recent commits, why it stopped.
fake-claude handed off · fake-codex pending and it is waiting for you to approve the start. The two fake- agents are the scripted ones the test suite uses, so this run spends no subscription usage.And here it is on a real machine.
Fifty-three seconds, recorded off the board, not a mockup: three agents running, claude's five-hour gauge filling, the terminal reading handing off to codex, 5h limit reached, and the work carrying on there without a restart.
One word in front of the command you already type.
leg claude --model opus is claude --model opus with Leg alongside. The agent's own prompt and permission flags pass through unchanged. Leg's hooks ride in a separate per-session settings file; your own settings file is never edited.
The first leg <agent> starts the board at http://127.0.0.1:4747 and opens it. Later sessions reuse it.
| command | usage percentages | the wall |
|---|---|---|
| leg claude | Claude Code's own usage endpoint, the same numbers as /usage, polled every 60 seconds | the StopFailure hook with rate_limit |
| leg codex | the rate limits Codex writes to its session rollout file | usage_limit_exceeded in the same file |
| leg agy | none; agy exposes no percentages | RESOURCE_EXHAUSTED in agy's log |
Each tap was read from the CLI's source or documentation and checked on a real machine on 11 September 2026: Claude Code 2.1.268, codex-cli 0.153.4, agy 1.2.0. Nothing is screen-scraped.
One page that says what to do next, in a sentence.
The biggest thing on the board is not a number, it is the finding: which login your terminals are all on, and how much of it is left. Under it, each login is a panel sized by how much it matters, the one carrying the work gets the instrument, the ones with a single fact get a line. Each terminal is one row: what it is doing, where, how long, and the buttons that apply to it. Finished terminals and what landed sit at the bottom as counts you can open, because they are history.
All 4 terminals are on claude, and claude has 5% left.
Measured 2h 13m ago. Four terminals have been running since, so the real figure is higher than 95 percent, never lower.
At the wall
Back Saturday 10:11 PM. Nothing runs on codex until then.
agy publishes no usage figure, ever. Leg shows its terminals and their elapsed time instead.
add an idempotency key to the refund path and cover it with tests
create.ts, idempotency.ts
rewrite the install page for the docs site
No prompt yet. This terminal has been open 6 minutes without a first turn.
Two agents in one repo, without either one stepping on the other.
Run a second agent in a repo where one is already working and they would normally fight over the same files. Leg gives the second one its own private copy of the checkout instead, on its own branch, so both edit freely and neither sees the other's half-finished work. Nothing is merged until you say so.
Under the hood that private copy is a git worktree at .leg-worktrees/<id> on branch leg/<id>, cut from whatever branch the checkout has out. The terminal prints one line saying where it is. If you have never used worktrees, you do not need to: Leg makes it and cleans it up.
The board's second lane is for background cards: work an agent does with no interactive terminal, each in its own worktree. Build stops with the changes sitting in that worktree and merges nothing. Build-land and Factory run the tests and merge on their own. You pick the first agent, and the fallback agents under Advanced options are the same handoff order.
Its row has a Land button: commit what the agent left, rebase onto the base, run the repo's tests, fast-forward the base. When a step fails nothing lands and the row says why: rebase-conflict with the files, tests-red with the end of the output, dirty-trunk when the checkout has local changes the landing would overwrite. Nothing is ever pushed.
Append exactly one line to the end of README.md that says: session B was here. Change nothing else, do not commit, then reply done.
README.md
landed on main, 98f8880, 1 file +1/-0
Append exactly one line to the end of README.md that says: session C was here. Change nothing else, do not commit, then reply done.
README.md
bounced (rebase-conflict): rebase onto main conflicted in README.md
Both terminals are changing README.md in separate checkouts. Whoever lands second rebases.
Between the warning and the wall, four things happen. You watch them.
85%The gauge crosses its reserve notch and the terminal bell rings once. Get to a stopping point, or keep typing.
limitLeg saves the bundle it has been refreshing every two minutes: the task, the last messages, git diff --stat, dirty files, recent commits, and why it stopped.
stopThe agent process is stopped and the terminal is put back the way it was, down to the mouse modes and scroll margins a killed agent leaves behind, so the next agent starts on a clean line under your history. The next option starts in it: another login of the same agent if you added one, otherwise the next agent in your order.
first turnThe new agent reads .leg/RESUME.md, checks git status and git diff, and carries on with the same task.
The order
You set it. Other logins of the same agent come first, then the other agents in the order you saved, each tried once. It is a priority list, not a rotation: put agy at the bottom and agy is the last option from a claude terminal and from a codex terminal alike. Settings holds the default new terminals copy, and Change order in a terminal's details changes that one terminal while it runs. An option whose CLI is missing or whose wall has not reset is skipped.
When every option is out
The terminal prints each option with its reset time, soonest first, then stays open with a countdown to the first reset and starts that agent from the bundle when it arrives. Ctrl-C, or End on the row, quits instead.
What is written, and what is never touched.
Subscription logins only. Leg is meant to sit beside tools you already trust, so the list of what it does not do is as exact as the list of what it does.
Never edited
~/.claude/settings.json~/.claude.json~/.codex/config.toml- agy's files, and your repo's settings
- Claude Code gets hooks through a per-session
--settingsfile under~/.leg; codex and agy get nothing injected
Written in your repo
.leg/, the session notes andRESUME.md.context-handoffs/, the bundles.leg-worktrees/, a second session's worktree, plus itsleg/<id>branch- all three added to
.git/info/exclude; landing fast-forwards your branch and nothing is pushed
Stripped and scrubbed
ANTHROPIC_API_KEY,ANTHROPIC_AUTH_TOKEN,ANTHROPIC_BASE_URL,ANTHROPIC_CUSTOM_HEADERS,OPENAI_API_KEY,OPENAI_BASE_URL,OPENAI_API_BASE,GEMINI_API_KEY,GOOGLE_API_KEY,GOOGLE_GEMINI_BASE_URL,GOOGLE_GENAI_USE_VERTEXAI,GOOGLE_GENAI_USE_ENTERPRISE,GOOGLE_CLOUD_PROJECT,GOOGLE_CLOUD_LOCATION,GOOGLE_APPLICATION_CREDENTIALS,CLAUDECODE,CLAUDE_CODE_*,CLAUDE_EFFORTandCLAUDE_PLUGIN_DATAare removed from every agent's environment;CLAUDE_CODE_PRINT_BG_WAIT_CEILING_MSis set to0for a detached Claude print session- Claude Code's stored login is read for the usage numbers and sent only to
api.anthropic.com; it is never written or printed - the ledger scrubs bearer tokens and key shapes from every line
- the board binds
127.0.0.1;leg share onis the one way to listen elsewhere, with a token per human leg uninstall --yesremoves~/.legand nothing else
One price for one human, and 30 days to change your mind.
There is no trial, because Leg does not pay off on a schedule. It pays off in the one moment a limit lands in the middle of something, which may be day two or day twenty. So buy it, use it on real work, and if it has not earned its place inside 30 days, reply to your receipt and we refund it in full. No reason required.
Personal
$79 once
- One human, any number of machines
- The board, usage tracking, the handoff bundle and the handoff itself
- A worktree per second session, and Land
- Every release for 12 months; the version you have keeps working after that
Team
$12 per seat, per month
- Everything in Personal, for each person on the board
leg share on: the board on Tailscale or your LAN, a token per human- Guests see redacted rows and can request a handoff; you approve it
- The key renews with the subscription;
leg license refreshfetches it
A key is a signed token checked on your machine with the public key that ships in Leg; the CLI talks to this site only to renew a Team key. After paying you land on a page with the key and it is emailed to you: leg license activate <key>. Prices are before tax; Stripe adds what your country charges. 30-day money-back guarantee: reply to the receipt, no reason needed, refunded in full.
Install
Node 22 or newer, git, Python 3 with pip, and at least one logged-in agent CLI.
npm install -g legclipip install -U context-handoff-bundlecd <any repo> && leg claudeVerified live on 11 September 2026 against Claude Code 2.1.268, codex-cli 0.153.4 and agy 1.2.0. 473 tests. Commercial software; the JavaScript ships readable so every claim on this page can be checked in the package.