GeeksDoByte
Architecture••4 min read

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-*.

By Rayen

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.

Why packets beat transcripts

Transcript / chat exportHand-written docBaton packet
Small enough to load into any agentNoYesYes
Every claim cites a checkable sourceNoRarelyYes
Detects when sources changed sinceNoNoYes
Secrets/PII removed before it leaves your machineNoNoYes
Tamper-evident (signed)NoNoYes
Expiring, revocable, auditedNoNoYes
Works across vendors/toolsNoYesYes
Safe against prompt injection on receiveNon/aYes — fenced as untrusted data

How it works

  1. /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.
  2. Redact + sign locally — secret and PII detectors run before anything leaves the machine. Then the packet is hashed and signed with your ed25519 key.
  3. Share — as a file, in git, or via your team’s Baton server (expiring, revocable links; every read audited).
  4. /receive — the receiving agent verifies integrity, re-checks every file:line source 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

PackageRole
@geeksdobyte/baton-mcpMCP server (npx -y @geeksdobyte/baton-mcp)
@geeksdobyte/baton-clibaton CLI
@geeksdobyte/baton-sdkTypeScript client for the team server
@geeksdobyte/baton-coreBuild, verify, render, query packets in your own tools
@geeksdobyte/baton-specPacket schema, canonical hashing, signatures
@geeksdobyte/baton-redactSecret/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.

BatonMCPAI AgentsOpen SourceSecurityClaude Code

Related Articles