Skip to content

Tool Pick|Baton — hand off a verifiable packet between agents, not a chat log

Dec 3, 20264 min
TL;DRBaton is an MCP server plus CLI that turns an agent session into a sourced, signed, redacted handoff packet, and re-checks whether every cited source still holds when you pick it back up. Install: npm i -g @geeksdobyte/baton-cli. It fixes the problem of shift handoffs relying on pasted chat logs that blow up context and can't be verified.

Look up & save

Loading dictionary…

中文版

Tool Info

FieldValue
NameBaton
TypeMCP server
GitHubRK905/baton
Stars2 (about a day old)
LanguageTypeScript
LicenseMIT
Installnpm i -g @geeksdobyte/baton-cli

What Problem It Solves

Have you spent a whole day chasing a bug in Claude Code, opened a fresh session the next morning to keep going, and ended up pasting in yesterday's entire chat log? It blows up the context window, buries the signal in unrelated tool-call noise, and occasionally still has an API key you forgot to scrub. Handing off to a different person, or a different agent entirely — say, moving from a Claude Code session to Cursor — is worse: nobody knows which conclusions already went stale or which paths were dead ends.

Baton turns that handoff into a structured Handoff Packet: a summary, a list of sourced facts (each tagged with a file:line), the decisions made and the alternatives rejected at the time, the pitfalls already walked into, and open_items spelling out what to do next. Building the packet runs roughly 30 secret/PII detectors locally first, then signs it with Ed25519. On /receive, Baton verifies the hash and signature, then re-checks every fact's cited file:line source — is the file still there, has the content changed, has the line shifted — and marks each one ok / moved / changed / missing, instead of assuming the packet's contents are still correct. The whole thing is finally handed to the receiving agent as untrusted data; the spec deliberately has no instruction field, to keep prompt injection from riding along inside a packet.

Good fits: picking up a debugging session the next day, handing a deep investigation off to the next engineer on the team, or moving across agent tools entirely (say, from a Claude Code session to Cursor). The "Solo" mode needs no server at all; the team edition with multi-user sharing, an audit trail, and SSO/SCIM needs a server running separately.

How a handoff packet moves from one agent to the next
How a handoff packet moves from one agent to the nextThe author-side agent drafts the packet, Baton redacts and signs it locally before sending, the receiver verifies the hash/signature and re-checks every fact's source, and only then is it fed into the new session as untrusted data. 1 Draft 2 Redact 3 Transport 4 Verify 5 Deliver Author Baton Receiver Draft packet Redact + sign Transport Verify check sources Hand off untrusted
  1. The author-side agent drafts a summary, facts, decisions, and next steps
  2. Baton runs its detectors locally to redact, then signs with Ed25519
  3. The packet moves over as a file, through git, or via a team server
  4. The receiver verifies the hash and signature, and re-checks every fact's file:line source
  5. Only verified content is treated as untrusted data and fed into the receiving agent's context

Simplified: the team edition's server storage, RBAC, and audit chain are omitted.

Getting Started

Install (Solo, officially "60 seconds")

npm i -g @geeksdobyte/baton-cli
baton init --user you@example.com          # creates ~/.baton and your signing key

# Claude Code: install the MCP server
claude mcp add baton -- npx -y @geeksdobyte/baton-mcp
# or install the plugin (adds /handoff, /receive, and matching skills):
#   /plugin marketplace add RK905/baton
#   /plugin install baton@baton

Basic Usage

Before ending today's session:

/handoff me "auth refactor — day 1"

In a brand-new session tomorrow (even with a different agent):

/receive last

The agent verifies the packet's integrity first, flags which facts' sources have changed or disappeared, then summarizes the current state and a suggested next step — waiting for your confirmation before acting.

Advanced Usage: CLI-only, for CI or non-MCP tools

baton create -t "Flaky checkout test" -s "Fails about 1 in 20 on CI; a race condition in the cart fixture" \
  --fact "The race is in fixture setup | file:tests/fixtures/cart.ts:41" \
  --next "Await cart.ready() before asserting" \
  --pitfall "Just retrying the job only hides the problem, it doesn't fix it"

baton verify ./handoff.baton.json --strict   # CI gate: fails this step if the signature/hash fails or a source has gone stale

Compared to Existing Approaches

Baton packetPasted chat logHand-written handoff doc
Small enough to fit any agent's context (too large)
Every claim cites a checkable sourceRarely
Detects when a source has gone stale
Secrets/PII stripped before leaving your machine
Tamper-evident (signed + hashed)
Works across vendors/tools (8 agents: Claude Code, Cursor, Copilot, Codex, Gemini CLI, and more)

Caveats

  • Still very new: v0.1.0, about a day old on GitHub, 2 stars — the design is thorough but hasn't seen real-world battle testing yet. Try it on a small scale before relying on it for real handoffs.
  • Redaction isn't foolproof: Baton's own threat-model doc says its roughly 30 regex/entropy detectors catch common formats, but custom formats or secrets split across fields can slip through. The packet has a reviewed_by_author field — eyeball it yourself before sending.
  • The receiving side still needs guardrails: the same threat-model doc calls out prompt injection by name. The spec has no instruction field and content is wrapped as untrusted data, but an LLM can still be swayed by adversarial text in it — keep tool permissions tight (confirm before acting) when receiving packets from outside your own org.
  • Team features add another layer: SSO/SCIM/audit-chain features run on a separate team server (Postgres + Docker). Solo mode needs none of that — just the CLI.
  • Requires Node.js 20.11 or newer.

Today's Takeaway

I used to think a "handoff" only had two forms: paste the whole transcript, or spend time writing a document — and neither one can answer "does this conclusion still hold?" Baton reframes the question: instead of making the next person re-feel their way through from scratch, it has the tool check whether the exact line of code a fact cited still looks the way it did. Handoff becomes something you can verify automatically, not something you just have to trust.

References