TaskBaton
ssthil/taskbaton
Passe o bastão entre agentes IA sem perder contexto nem decisões
Ver no GitHubCLI que gerencia o estado do trabalho entre sessões de agentes IA diferentes (Claude Code, Cursor, Gemini, Codex), garantindo continuidade sem perda de contexto ou decisões. Mantém um diretório `.baton/` centralizado onde cada agente lê o histórico completo e sabe exatamente por onde continuar, com checkpoints revisados pelo usuário.
Instalação
npx convez-ai ssthil/taskbaton1 comando no terminal: detecta o formato do repositório (marketplace ou plugin avulso) e instala via Claude Code. Requer Node 18+ e o Claude Code instalado.
Métricas
Casos de uso
- Orquestração de múltiplos agentes IA em um único projeto
- Preservação de decisões arquiteturais e restrições entre sessões
- Workflow de desenvolvimento com humano como checkpoint
Veredito

Ferramenta prática que resolve um problema real: manter coesão quando múltiplos agentes trabalham no mesmo projeto. Implementação limpa em Go, bem documentada e com fluxo de trabalho que prioriza o controle humano.
README
A tradução para o português deste README ainda está na fila.
Every Agent Starts Blind. Until Now.
When you switch tools mid-project — Gemini plans, Claude Code builds, Cursor reviews, Codex refactors — every new session starts from scratch. Decisions are lost. Constraints are forgotten. Work gets redone.
taskbaton manages a
.baton/directory in your project root. Any agent readscurrent.mdat the start of a session and immediately knows the stage, what was decided, what must not change, and what to do next. The human reviews and seals every handover — you stay the checkpoint between every stage.
taskbaton init: Scaffold.baton/once. Every stage that follows lives there.taskbaton new+review: Create a stage, fill in decisions and next tasks — you or your agent drafts it, you confirm.taskbaton seal: Lock it. Stamp the timestamp. Archive it. The baton passes.
How the flow works
taskbaton init ← scaffold .baton/ once in the project root
│
▼
taskbaton new "planning" ← Gemini CLI: start the first stage
taskbaton review ← fill decisions, next tasks, constraints in $EDITOR
taskbaton seal \
--from gemini-cli \ ← human reviews and locks the handover
--next claude-code
│
▼
Claude Code reads .baton/current.md ← knows exactly where to start
... builds the feature ...
taskbaton new "feature/auth"
taskbaton review ← agent proposes, developer confirms
taskbaton seal \
--from claude-code \
--next cursor
│
▼
Cursor reads .baton/current.md ← picks up without a brief
taskbaton seal --from cursor --next codex
│
▼
taskbaton log ← full stage history, every decision preserved
Human is the checkpoint at every seal. Agent drafts, human confirms, baton passes.
Installation
Homebrew (macOS / Linux)
brew tap ssthil/senthil-tools
brew install taskbaton
Go
go install github.com/ssthil/taskbaton@latest
Binary releases — download from Releases, verify with checksums.txt.
Upgrade
brew upgrade taskbaton
# or
go install github.com/ssthil/taskbaton@latest
Quick start
cd your-project
taskbaton init # scaffold .baton/ once
taskbaton new "planning" # create the first stage
taskbaton review # fill in .baton/current.md in $EDITOR
taskbaton seal --from gemini-cli --next claude-code # lock and archive
taskbaton status # show stage + seal state
taskbaton next # print next tasks for incoming agent
How it works
-
taskbaton initscaffolds.baton/in your project root withcurrent.md,current.json,config.yaml, and ahistory/archive directory. Run once per project. -
taskbaton new <stage>creates a blank baton for the named stage with all section headers pre-filled. Pair it withtaskbaton reviewto edit — or let your agent draft it and you confirm. -
taskbaton reviewopens.baton/current.mdin$EDITOR. Fill in completed work, decisions (with reasons), next tasks, constraints that must not change, and open questions. -
taskbaton seal --from <tool> --next <tool>locks the baton. Sets status tosealed, stamps the timestamp, writes both.mdand.json, and archives the stage to.baton/history/. Only a human should run this — it is the handover gate. -
taskbaton nextprints the## Next Taskssection to stdout — the exact lines the incoming agent starts from. -
taskbaton exportoutputscurrent.jsonto stdout — pipe it into scripts, CI checks, or agent context loaders.
The baton format
Every .baton/current.md follows this structure:
# Baton — feature/auth
**Stage**: feature/auth
**Status**: sealed
**From**: claude-code
**Sealed**: 2026-06-08T10:42:00+08:00
**Next**: cursor
## Completed
- JWT middleware in src/middleware/auth.go
- /login and /refresh endpoints, unit tests passing (84% coverage)
## Decisions
- RS256 not HS256 — asymmetric keys required by security team
- Token expiry: 15min access / 7d refresh — do not change without PM sign-off
- Refresh tokens in Redis, not DB — performance decision
## Next Tasks
- Implement RBAC on top of existing auth
- Start at src/middleware/rbac.go
- Reference: docs/roles.md for role hierarchy
## Constraints — Do Not Change
- src/middleware/auth.go — sealed by security review
- Token storage: keep in Redis
- Auth errors: always 401, never 403 (API contract)
## Open Questions
- Rate limiting strategy — ask developer before implementing
A machine-readable .baton/current.json is always generated alongside it.
Commands
| Command | Description |
|---|---|
taskbaton init | Scaffold .baton/ in the current project |
taskbaton new <stage> | Create a new open baton stage |
taskbaton review | Open .baton/current.md in $EDITOR |
taskbaton seal --from <tool> --next <tool> | Seal, stamp, and archive the current baton |
taskbaton checkpoint | Save current state mid-session without sealing |
taskbaton next | Print next tasks for the incoming agent |
taskbaton status | Show current stage and seal state |
taskbaton log | List all archived baton stages |
taskbaton export | Output current baton as JSON |
taskbaton mcp | Start the MCP server (stdio transport) |
MCP server
Without MCP, every incoming agent has to manually read .baton/current.md or run taskbaton export to pick up context. With taskbaton mcp, baton state is native context — the agent reads it like any other resource, automatically, at session start.
Agent session starts
│
▼
MCP host reads baton://current ← stage, decisions, next tasks, constraints
│
▼
Agent knows exactly where to start — no copy-paste, no manual read
│
▼
... does the work ...
│
▼
taskbaton seal --from <tool> --next <tool> ← human gates the handover
│
▼
Next agent reads updated baton://current automatically
Setup
Claude Code — add once per project:
claude mcp add taskbaton taskbaton mcp
Or add to .mcp.json in your project root (works with any MCP-compatible host):
{
"mcpServers": {
"taskbaton": {
"command": "taskbaton",
"args": ["mcp"]
}
}
}
Resources exposed:
| URI | Content |
|---|---|
baton://current | Full .baton/current.md (Markdown) |
baton://current.json | Structured baton state (JSON) |
baton://history | Archived stage list |
Tools exposed:
| Tool | Returns |
|---|---|
get_status | Stage name + seal state |
get_next_tasks | Next Tasks list |
get_constraints | Constraints — Do Not Change list |
AGENTS.md convention
Paste this into your project's AGENTS.md so every agent picks it up automatically:
## Baton Protocol
- Session start: run `taskbaton status` and read `.baton/current.md` fully
- Session end: run `taskbaton new <stage>`, fill template, get human review,
then `taskbaton seal --from <your-tool> --next <next-tool>`
- Never start work if a sealed baton exists without reading it first
- Never seal without developer confirmation
A ready-made Claude Code skill lives in examples/claude-skill/SKILL.md.
Philosophy
- Human seals, agent drafts. The agent fills in what it did. The developer reads, edits if needed, and runs
seal. No baton passes without a human in the loop. - Decisions with reasons, not just outcomes. A constraint without a reason gets overridden by the next agent. Record the why so it survives the handover.
- Plain files, no server.
.baton/is just a directory of text files. Check it into git, diff it, grep it, edit it by hand. No daemon, no cloud sync, no API keys.
Part of a suite
| Tool | Layer | Problem solved |
|---|---|---|
| human-steerkit | Within a session | Human stays in control of agent decisions |
| llmroute | Across providers | Routes prompts to the right LLM dynamically |
| taskbaton | Across sessions | Preserves work state between tool switches |
Three tools. One philosophy: humans steer, agents execute, nothing gets lost.
Development
make build # build to ./bin/taskbaton
make test # run tests with race detector
make lint # go vet + gofmt
make snapshot # local cross-platform build via goreleaser
License
MIT — see LICENSE.