- Home
- Skills
- Agents & Orchestration
- baton: Never Lose a Claude Code Task to Usage Limits
More screenshots
Works with the AI Agents you already use
baton: Never Lose a Claude Code Task to Usage Limits
Claude hits its limit mid-task? baton hands the work to Codex or OpenCode, resumes when the limit resets, and pings you on Telegram.
$5
baton: Never Lose a Claude Code Task to Usage Limits
Example session with this skill installed
Install baton and have it add a power(a, b) function to calc.py, with a test.
- Read your context and instructions
- Compiled the baton
A real session
Real Claude Code, fresh Ubuntu 24.04 container, baton 1.4.0 installed with the SHA-256-checked installer the skill pins. Task queued, Claude finished it in
14 seconds, tests pass.
- Not shown: the installation, the user's own sign-in, and
baton setup(Telegram skipped,~/srcgiven as a trusted directory). - The container has no systemd, so the herdr server was started by hand. On a real machine, baton's service starts it.
- The sample repo lets Claude Code edit files without asking (
.claude/settings.json:"allow": ["Edit", "Write"]). Commands still go through baton's policy, which approves tests in trusted directories. - Output is from the real session log. For length, a few doctor hint lines, the
baton runJSON logs and the diff's context lines are shortened; nothing was changed or added. Every command exited with 0.
1. Check the setup
$ baton doctor
ok config /home/ubuntu/.config/baton/baton.toml
ok system linux x86_64
ok database /home/ubuntu/.local/share/baton/baton.db (created on first use)
ok herdr herdr 0.9.5 at /home/ubuntu/.local/bin/herdr
ok herdr server reachable at /home/ubuntu/.config/herdr/sessions/baton/herdr.sock
ok claude integration current (v11)
ok claude 'claude' -> /home/ubuntu/.local/bin/claude
ok git /usr/bin/git
ok baton-detect baton-detect 1.4.0 at /home/ubuntu/.local/bin/baton-detect
ok detector /home/ubuntu/.local/bin/baton-detect
ok claude limits none reported yet: Claude's budget is an estimate until a Claude session baton starts has answered
ok policy /home/ubuntu/.config/baton/policy.yaml: read-only commands approved without asking; tests and builds only in 2 trusted dirs
ok projects /home/ubuntu/dev/baton-projects
ok project preview http://127.0.0.1:8765/ (this machine only)
warn screenshots no Chromium or Chrome found: deliveries come without a picture
ok timezone Etc/UTC
warn telegram not configured; notices go to the log only
The two warn lines are optional parts this demo doesn't use.
2. Queue the task
$ cd ~/src/calc && cat calc.py
def add(a, b):
return a + b
def subtract(a, b):
return a - b
$ baton task add "power function" -C ~/src/calc -i "Add a power(a, b) function to calc.py that returns a raised to b, and a test for it in test_calc.py. Then run the tests with python3 -m pytest."
t-6776f923
$ timeout 1200 baton run
[… 7 lines of baton run logs trimmed …]
t-6776f923 completed
baton run runs the open tasks once and exits. The baton service does the same in the background and reports it on Telegram.
3. The result
$ baton status
t-6776f923 completed power function claude:succeeded
--- a/calc.py
+++ b/calc.py
def subtract(a, b):
return a - b
+
+
+def power(a, b):
+ return a ** b
--- a/test_calc.py
+++ b/test_calc.py
-from calc import add, subtract
+from calc import add, subtract, power
...
+def test_power():
+ assert power(2, 3) == 8
+ assert power(5, 0) == 1
+ assert power(2, -1) == 0.5
$ python3 -m pytest -q
... [100%]
3 passed in 0.01s
Next steps
- Run
baton setupagain and connect your Telegram bot to get these reports on your phone. - Run
baton service installso baton keeps working through your queue in the background. - Queue real work with
/new …from Telegram, and check on it with/statusand/budget.
Connects securely to your tools. The creator never sees your data.
About this skill
Never lose a coding task to a usage limit
Claude hits its 5-hour limit at 2 a.m. and your refactor dies half-done. baton notices, hands the task to Codex CLI or OpenCode, and resumes the original session when the limit resets. It sends new work to the agent with the most quota left, restarts crashed or hung sessions, and pings you on Telegram only when a human is needed. Everything runs on your own machine, and none of your code leaves it.
Queue tasks, go to sleep, and wake up to finished work.
What baton handles on its own
- Usage limit: moves the task to the next agent with quota. If every agent is limited, it waits for the first reset and resumes the same session.
- Crash or hang: resumes the agent's own session (a hang is 15 minutes with no screen or token change).
- Quota-aware scheduling:
/budgetshows what each agent has left (Claude's 5-hour and weekly windows included); new tasks go where there is room, keeping a reserve. - Permission policy: read-only commands go through; deletes, pushes, downloads and sudo ask you first.
- Append-only event log of every decision, with its reason.
From Telegram you can
- start a project with
/new a one-page site for my cafe, read the agent's plan and press Start - see what is running with
/statusand what each agent has left with/budget - approve or deny an agent's permission prompt with one button, or answer its question by replying
- cancel a task (
/cancel t-…) or move it to the cheaper model (/tier t-… economy) - stop everything at once by writing
stop - write in plain words ("cancel the cafe task") with the optional local assistant (Ollama); each request comes back as a card to confirm
What you get by buying
The packaged agent skill. Your coding agent installs baton with SHA-256-checked downloads (one command per system, no sudo), runs baton doctor, fixes what it finds with the bundled troubleshooting guide, and queues, cancels and retargets tasks for you. Updates are included. It never asks for or touches your tokens: you type the bot token into baton setup yourself.
You bring
- at least one of Claude Code, Codex CLI or OpenCode, installed and signed in with your own account (two or more for hand-offs)
- a Telegram bot token from @BotFather
- git
Privacy
baton runs locally and uploads none of your code. Your agents talk to their providers as they always do; Telegram only receives baton's notices. Publishing finished pages to Vercel is off unless you turn it on. The computer baton runs on has to stay on and awake.
Platform support
"Supported" = run end to end on a real machine. "Beta" = built and tested automatically, not yet on a real machine or with a real agent.
| System | Status |
|---|---|
| Ubuntu (x86_64) | Supported |
| Windows 10/11 with WSL1 | Supported |
| Debian 12, Fedora 42, Arch | Beta (clean install passes in containers) |
| Windows 10/11 with WSL2 | Beta |
| Windows 10/11, native | Beta |
| macOS (Apple Silicon and Intel) | Beta |
| Linux ARM64 | Beta |
Requires: baton 1.4.0 and herdr 0.9.1–0.9.5. The install script sets up both.
Runs on your own computer, which must stay on and awake. Supported end to end on Ubuntu and Windows with WSL1; Debian, Fedora, Arch, WSL2, native Windows, macOS and Linux ARM64 are beta (built and tested automatically, not yet on a real machine). You sign in to your agents and type the Telegram bot token yourself.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before buying a skill.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Money-back guarantee
Doesn't do what its page promises? You get your money back.
Trust & safety
Security scan
Security scan passed 9 days ago
- Accounts
GitHub
Telegram
AstralTelegram bot token (from @BotFather)
- Software
- Claude CodeorCodex CLIorOpenCode (signed in)
Git
Python
Runs on your own computer, which must stay on and awake. You sign in to your agents and type the Telegram bot token yourself; the skill never handles them.
Permissions
Allowed Hosts
What's inside
Frequently Asked Questions
New in Agents & Orchestration
Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for Agents & Orchestration.