Baton: Pass the Context, Not the Chat Log
Baton turns AI agent sessions into signed, redacted Handoff Packets — verifiable knowledge handoff across Claude Code, Cursor, Copilot, Codex, and Gemini. Open source on GitHub; packages on npm as @geeksdobyte/baton-*.
Real work now happens inside agent sessions — Claude Code, Cursor, Copilot, Codex, Gemini. When the session ends, the shift changes, or someone leaves, that context usually dies. Copy-pasted transcripts are huge, noisy, leak secrets, and cannot be verified. Hand-written docs go stale the moment the repo moves.
Baton is the open-source alternative: pass the context, not the chat log.
It turns any agent session into a signed, redacted Handoff Packet that another person or agent can pick up and continue in seconds — across tools and vendors.
- GitHub: github.com/RK905/baton
- npm org: @geeksdobyte on npm — start with
@geeksdobyte/baton-cliand@geeksdobyte/baton-mcp
Why packets beat transcripts
| Transcript / chat export | Hand-written doc | Baton packet | |
|---|---|---|---|
| Small enough to load into any agent | No | Yes | Yes |
| Every claim cites a checkable source | No | Rarely | Yes |
| Detects when sources changed since | No | No | Yes |
| Secrets/PII removed before it leaves your machine | No | No | Yes |
| Tamper-evident (signed) | No | No | Yes |
| Expiring, revocable, audited | No | No | Yes |
| Works across vendors/tools | No | Yes | Yes |
| Safe against prompt injection on receive | No | n/a | Yes — fenced as untrusted data |
How it works
/handoff— your agent drafts a packet: summary, atomic facts with sources, decisions with rejected alternatives, pitfalls, and open items with a concrete next step. You review it.- Redact + sign locally — secret and PII detectors run before anything leaves the machine. Then the packet is hashed and signed with your ed25519 key.
- Share — as a file, in git, or via your team’s Baton server (expiring, revocable links; every read audited).
/receive— the receiving agent verifies integrity, re-checks everyfile:linesource against its working tree (ok / moved / changed / missing → stale), and loads the packet fenced as untrusted data so instructions hidden in a packet cannot hijack it.
Quickstart (solo, ~60 seconds)
Requires Node.js 20.11+. Packages publish under @geeksdobyte/baton-*.
npm i -g @geeksdobyte/baton-cli
baton init --user you@example.com
# Claude Code MCP
claude mcp add baton -- npx -y @geeksdobyte/baton-mcp
# or install the plugin:
# /plugin marketplace add RK905/baton
# /plugin install baton@baton
In a session: /handoff me "auth refactor — day 1". Tomorrow, in a fresh session or a different tool: /receive last.
npm packages
| Package | Role |
|---|---|
@geeksdobyte/baton-mcp | MCP server (npx -y @geeksdobyte/baton-mcp) |
@geeksdobyte/baton-cli | baton CLI |
@geeksdobyte/baton-sdk | TypeScript client for the team server |
@geeksdobyte/baton-core | Build, verify, render, query packets in your own tools |
@geeksdobyte/baton-spec | Packet schema, canonical hashing, signatures |
@geeksdobyte/baton-redact | Secret/PII scanner |
Works with your agents
Baton is MCP + CLI + SDKs, so it is vendor-neutral by design: Claude Code, Claude Desktop, Cursor, VS Code / Copilot agent mode, Windsurf, Codex CLI, Gemini CLI, Zed, any MCP client, plus Python and TypeScript SDKs for custom agents.
MCP tools include handoff_create, handoff_redact, handoff_send, handoff_receive, handoff_verify, handoff_query, handoff_list, and handoff_revoke.
Teams and enterprise
The open-source team server is built for multi-team environments: OIDC SSO, SCIM, RBAC, classification labels, encryption at rest, org signing-key registry, expiring/revocable links, hash-chained audit logs, webhooks, Helm, and a SOC 2 control mapping (controls that support a program — not a certification by themselves).
See the self-hosting docs, threat model, and SOC 2 mapping in the repo.
Where this fits
If you already use discipline skills like proof-before-done and review-triage, Baton is the layer that moves verified context between sessions and people — not just better prompts inside one chat. For the broader agent-skills set, see five open agent skills.
Baton is MIT-licensed. Start on GitHub or install from npm. If you want help wiring handoffs into your team’s agent workflow, book a strategy call.
