baton
by Tuncay Aydin · ★ 0 · updated 20 Oct 2026
Context budget guard and handoff relay: measures real context use per model request, stops subagents that run too long or too big, and hands work over to a fresh session before the main agent drowns.
Install
/plugin marketplace add hal-9/claude-mods/plugin install baton@claude-modsThen run /reload-plugins or start a new session. Requires Claude Code 2.1.287+.
What it hooks into
From an automated scan with claude plugin validate, not a security review. Mods run with your permissions; read the code before installing.
- Events
session.startturn.startagent.spawnturn.stepturn.completesession.measuretool.callcommand.runui.render- API calls
$.clock.every$.clock.now$.command.register$.session.append$.session.cwd$.session.id$.session.usage$.state.get$.state.set$.store.delete$.store.get$.store.set$.tool.register$.ui.resolve$.ui.status$.ui.toast- Draws
AbovePrompt- Can see
subagent spawnsmcp__baton__handoff calls- Reach
- level 2 of 3 drives Claudereads mod statepersists statedraws
Origin
- How it got here
- Automated scan of public GitHub repos, via the CC0 dataset awesome-claude-code-mods (scan of ).
- Repository
- github.com/hal-9/claude-mods
- Path in repo
mods/baton- Source commit
b1e79aathe exact code the scan read- Author
- Tuncay Aydin @hal-9
- License
- MIT
- First published
- Last pushed
- First listed here
Name and description come from the mod's own manifest. We link to the code; we don't host it, and it stays under its author's license.
More from hal-9/claude-mods
cache-meter
hal-9/claude-mods
Band above the prompt: prompt-cache countdown, cache hit rate, context fill and a Compact button, plus a keepwarm row from cache-tax that pings the cache through breaks and stops a cold send once with its rewrite cost.
mod-switch
hal-9/claude-mods
A mods button in the prompt footer opens a popover of every installed mod with switches that enable or disable them at user scope.
relay
hal-9/claude-mods
Role buttons above the prompt: check or adversarially review the working tree with Codex, hand a task over to Codex, or verify with a second Claude model. A pane streams the run and turns findings into fix prompts.