Coding agents · Developer tools
Different models.
One continuous task.
Baton is a coding-agent harness that lets a task continue across LLM providers. Switch deliberately, or hand off when a model hits a quota or availability limit.
Keep the work.
Change the model.
A coding task can outlast a provider’s quota. Moving to another model often means reconstructing the conversation, re-explaining the files, and finding the exact point where work stopped.
Baton keeps a provider-neutral session with the conversation and tool results, while files stay in the workspace. A new model receives the handoff context and current repository status, so it can continue the task instead of beginning again.

The handoff
State belongs to the session,
not the provider.
- WorkThe active model uses a shared tool engine. Messages and completed tool results are recorded in the session.
- SwitchUse
/modelto choose another model. The router also handles retries and failover for limits, authentication errors, and outages; malformed requests surface as errors. - AdaptProvider adapters translate the shared conversation into each protocol. If the next model has a smaller context window, deterministic compaction prepares a shorter view while preserving the saved history.
- ContinueThe incoming model receives a handoff note, current Git status, and information about running background processes.
Several routes
into the same session.
Official CLIs
Claude Code and Codex integrations use the user’s signed-in CLI sessions. The official tools handle subscription authentication.
Direct APIs
Adapters support Anthropic Messages and OpenAI Responses, with provider-specific handling for reasoning blocks.
Compatible servers
OpenAI-compatible Chat Completions endpoints support services such as OpenRouter, LiteLLM, Ollama, and vLLM.
Manual choice
The model picker shows configured accounts and models, so switching is also a deliberate workflow choice.
Compatibility depends on the provider, model, tool-calling behavior, and the configured adapter. This is a defined set of integrations, not a claim that every model or CLI works unchanged.
One tool engine.
Consistent controls.
Baton provides file operations, search, shell commands, Git status, and background-process management. MCP integrations make additional tools available across providers.
The harness includes approval prompts, plan mode, resumable sessions, and per-request checkpoints for undo. It also loads project instructions and supports skills, commands, and hooks. A provider switch should not discard those operating rules.
Reasoning payloads are handled separately from ordinary conversation: model-bound blocks are replayed only to the model that produced them. They are not forwarded to a different provider during a handoff.
Early project · v0.1
What to inspect
before relying on it.
The repository includes tests for routing, compaction, tool pairing, checkpoints, provider translation, and scripted hot-swaps, including SDK wire tests against fake servers. These are development checks, not evidence of universal provider compatibility.
Smaller context windows may require a compacted view. Handoffs into the official CLIs use a transcript representation. These are real tradeoffs: preserving a session does not mean every provider sees an identical native conversation.
Provider behavior, CLI interfaces, and model availability change. Check the current setup guide and run the included baton doctor check for your configured chain.
Try it from
the source.
The project requires Node.js 20 or newer. The README includes installation, authentication, configuration, and the current roadmap.
baton init
baton doctor
baton