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 legcli
pip install -U context-handoff-bundle

Then 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.

claude wes@work 5h41% 7d18%
~/acme/api $ leg claude --model opus session claude-a3f8 · claude · board http://127.0.0.1:4747 (started) · next: codex → agy add an idempotency key to the refund path and cover it with tests Editedsrc/refunds/create.ts Editedsrc/refunds/idempotency.ts Rannpm test -- refunds 14 passed, 1 failed Editedtest/refunds/idempotency.test.ts claude hit its usage limit: rate_limit bundle saved: .context-handoffs/20260911-154212-leg-claude-a3f8 starting codex in this terminal from the bundle codex wes@personal · same folder, same branch You are taking over an interactive coding session from claude, which hit its usage limit. Read .leg/RESUME-claude-a3f8.md (the context handoff bundle is at .context-handoffs/20260911-154212-leg-claude-a3f8), check git status and git diff, then continue the work from where it stopped. Do not ask the human to restate the task. Read.leg/RESUME-claude-a3f8.md Rangit status · git diff  The store lookup in idempotency.ts is missing. Adding it and rerunning the failing test. Rannpm test -- refunds 15 passed
The pointer prompt is the one Leg sends; it also appends the task as you first stated it. The bundle carries the rest: the task, the last messages, git diff --stat, dirty files, recent commits, why it stopped.
A Leg card mid-handoff: the agent now reads fake-codex, the status is needs approval, the chain says fake-claude handed off, fake-codex pending, and the buttons are Approve, Reassign and Kill.
And the same moment on the board, from a real run. The first agent hit its limit, Leg wrote the bundle and moved the card to the next agent; the chain line reads 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.

beforeclaude --model opus
afterleg claude --model opus
alsoleg codex -m gpt-5.3-codex-spark
alsoleg agy
commandusage percentagesthe wall
leg claudeClaude Code's own usage endpoint, the same numbers as /usage, polled every 60 secondsthe StopFailure hook with rate_limit
leg codexthe rate limits Codex writes to its session rollout fileusage_limit_exceeded in the same file
leg agynone; agy exposes no percentagesRESOURCE_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.

The board, recreated in HTML from the same sample session as the terminal above. The layout, the wording and the colours are the real ones; the tasks are illustrative.
The real Leg board at 1280 pixels: the headline reading that all four terminals are on claude and claude has five percent left, panels for claude, codex and agy, four terminal rows with their prompts and buttons, and counts for finished terminals, landed commits and background tasks.
And the real one, unedited, from a running board. Same page, same words, actual work.

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.

Both terminals are changing README.md in separate checkouts. Whoever lands second rebases.

From a live run on 11 September 2026: three claude sessions in a throwaway repo, the second and third in their own worktrees. Land on the second ran the tests and fast-forwarded main; Land on the third bounced and kept its commit on its branch.

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.

limit

Leg 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.

stop

The 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 turn

The 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 --settings file under ~/.leg; codex and agy get nothing injected

Written in your repo

  • .leg/, the session notes and RESUME.md
  • .context-handoffs/, the bundles
  • .leg-worktrees/, a second session's worktree, plus its leg/<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_EFFORT and CLAUDE_PLUGIN_DATA are removed from every agent's environment; CLAUDE_CODE_PRINT_BG_WAIT_CEILING_MS is set to 0 for 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 on is the one way to listen elsewhere, with a token per human
  • leg uninstall --yes removes ~/.leg and 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
Buy Personal, $79

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 refresh fetches it
Buy Team, $12 a seat

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 legcli
pip install -U context-handoff-bundle
cd <any repo> && leg claude

Verified 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.