baton
Relays long coding goals across Codex, Antigravity and Claude API agents while enforcing each vendor's usage and spend limits.
At a Glance
baton core is MIT-licensed and free to use, modify and distribute. Requires user's own Codex/Antigravity plans and optionally a Claude API key (external costs).
Engagement
Available On
Listed Nov 2026
About baton
baton is an open-source Python tool by cahian that keeps a coding task moving between Codex, Antigravity and Claude API agents. You give it an objective and a working directory, with an optional verification command. One vendor owns the task and hands it off only when a configured limit is reached or you request a switch.
What It Is
baton is a command-line orchestrator that drives vendor CLIs you already have installed; it reimplements no agent. By default, one vendor runs the whole task using its native tools, goals, skills and subagents. When a limit is hit, baton passes a sanitized conversation transcript and each vendor's native session ID to the next vendor. If every vendor is out of quota, it waits for the earliest reset and continues.
How the Handoff and Limit Guards Work
Baton reads Codex rate limits and credit balance, and Antigravity's usage and credits, before and during each round, and stops at a configured threshold (90% by default). Claude spend is tracked in a local ledger with per-round, per-turn and per-goal caps. A read that fails is treated as unknown and stops the agent. With a verify command, exit 0 confirms completion; without one, the vendor's completed response ends the task.
Optional Phases, Memory and Chat Interface
Setting phases = true enables Baton-managed plan, build and review cycles, plus a consensus step in which every eligible agent must approve, using Superpowers methods. ai-memory can add long-term memory across goals in the same directory. Baton can also be used from OpenCode through a local OpenAI-compatible gateway exposing the model baton/auto, with chat commands to set goals or switch vendors. Jobs can be inspected and controlled with commands such as baton jobs, status and stop.
Setup Path
Install with uv (Python 3.12 or newer), run baton skills install and baton doctor, and sign in to at least one of Codex or Antigravity. A launchd service is available on macOS; on Linux, keep baton serve running in a terminal or tmux.
Community Discussions
Be the first to start a conversation about baton
Share your experience with baton, ask questions, or help others learn from your insights.
Pricing
Open Source (MIT)
baton core is MIT-licensed and free to use, modify and distribute. Requires user's own Codex/Antigravity plans and optionally a Claude API key (external costs).
- MIT License
- Relays coding goals across Codex, Antigravity and Claude API
- Enforces per-vendor usage and spend limits
- Optional Baton-managed plan/build/review phases
- Vendor plans and Claude Console API usage are external costs
Capabilities
Key Features
- Hands a coding task between Codex, Antigravity and Claude API when limits are reached
- Pre-emptive usage and credit guards that stop a round before paid spend
- Sanitized conversation transcript and native session ID handoff
- Optional verify command to confirm completion
- Opt-in plan, build, review and consensus phases
- Local Claude spend ledger with round, turn and goal budgets
- Optional long-term memory via ai-memory
- OpenCode gateway exposing baton/auto
- Chat and CLI commands to set goals, switch vendors, and stop jobs
- Installable baton-oneshot Agent Skill
- Automatic local snapshot commits after each round
