Open source · MIT or Apache-2.0
anchorleg runs your Claude Code and Codex tasks in the background and watches every account's 5-hour and weekly limits. When one runs low, it pauses at a clean step, writes a handoff, and carries on with the same task on another of your accounts, or on another CLI. It never spends usage credits unless you allow it.
curl -fsSL https://raw.githubusercontent.com/snehal96/anchorleg/main/install.sh | bash
macOS and Linux. Also as a .deb, prebuilt binaries or cargo install; Homebrew is coming soon. Install details
See it run
Who it's for
Add a ChatGPT plan next to it. When Claude runs low, anchorleg continues the task on Codex
from a handoff instead of on metered credits, and it never spends credits unless you allow
it. anchorleg usage shows what each account costs you.
Work and personal, Claude and ChatGPT: anchorleg watches every account's limits and moves the task to whichever has room, with its context.
How it works
anchorleg starts the official CLI (claude or codex) for you
and reads its event stream. Inside Claude Code, a small mod reports exact usage and knows where
it is safe to stop; Codex reports its quota after every model call.
Every account's 5-hour and weekly windows, from the CLI's own rate-limit events and the mod's exact percentages.
Before the next model request, never mid-edit. Tool results so far are already saved in the session.
.handoff/TASK.md with the goal, steps, files touched and last message, plus a local git checkpoint of the working tree.
The next account gets the session and project memory and resumes it. A large context starts fresh from the handoff instead.
Features
anchorleg ui lists every session with its live conversation, takes new tasks and
replies, and shows each account's quota. Keyboard first, mouse works too.
┌ Sessions ──────────┐┌ #12 · claude-home · running ─────────────┐
│ + New session ││> fix the failing auth tests │
│ ● #12 claude-home ││⏺ Bash(cargo test auth) │
│ ✓ #11 claude-work ││· anchorleg: claude-work paused (92%) │
├ Agents ────────────┤│⏺ All 14 auth tests pass. │
│ 1 claude-work ████ ││ │
│ 2 claude-home █░░░ │├ Reply to #12 (Enter to send) ─────────────┤
└────────────────────┘└───────────────────────────────────────────┘
A background run can't show Claude's permission dialog, so anchorleg asks you instead. The session waits until you answer: 1 yes, 2 yes for this session, 3 no.
───────────────────────────────────────────────
Allow Write(src/auth/session.rs)?
Claude requested permissions to write to src/auth/session.rs
1 Yes 2 Yes, for this session 3 No
--plan: approve a plan before anything changes. --goal "cargo test
passes": keep going, turn after turn, until it holds, even across accounts.
anchorleg review 12 --cli codex --fix: another account or CLI reviews a
session's changes and sends the findings back.
Nobody watching? --mode auto lets the CLI's own reviewer approve instead of
you. accounts set work --stop-at 0.4 moves off an account at 40%.
One setting per provider, shared by all its accounts, so a task keeps the same strength
when it moves. Type /model opus or /effort high in the message box.
Your own slash commands and skills pass straight through.
Every command has --json output and stable exit codes, so another program
(your own task delegator, a CI job) can run anchorleg as a subprocess.
| Exit | Outcome |
|---|---|
| 0 | done |
| 75 | every account blocked (with --no-wait) |
| 78 | no account configured |
| 130 | stopped by you |
Ground rules
anchorleg switches between accounts you own by relaunching the official CLI. That's all.
claude, codex and agy (later cursor-agent) exactly as you would.refs/anchorleg/. Your branch, index and stash are untouched.Status
Real switches between Claude accounts are verified; Codex is verified on real accounts (runs, follow-ups, live quota, approvals, the 90% pause). Antigravity support is under development. The rest is covered by tests that replay captured CLI output.
Get started
# 1. install (have claude or codex signed in) curl -fsSL https://raw.githubusercontent.com/snehal96/anchorleg/main/install.sh | bash # 2. add your accounts: import shell aliases like # alias claude-work='CLAUDE_CONFIG_DIR=~/.claude-work claude' anchorleg accounts import-aliases --yes # 3. one model and effort for every Claude account anchorleg settings claude --model sonnet --effort high # 4. open the session manager, press n, describe the task anchorleg ui