Baton: persistent task memory for Claude Code

A logbook per task, kept by hooks, so the next session knows what the last one did. Local, MIT, for offices and companies as much as for one person.

The problem it solves

A long task in Claude Code spans many sessions. A session ends or its context is compacted, and the next one starts without knowing what was done or decided. Rules in CLAUDE.md are advice the agent may skip; Baton makes keeping a record a hook, which Claude Code runs whatever the agent decides.

How it works

  • Every task gets a folder with a LOGBOOK.md: dated entries, newest on top, the next step in the header.
  • At session start a hook shows the board of your tasks, ordered by whose move it is, and the agent reads the logbook of the task you name.
  • When work in a task folder is newer than its logbook, a Stop hook hands the turn back and asks the agent to write the entry.
  • Right after compaction the agent is told to write the entry first, from the summary and the messages after it.

For offices and companies

  • Local. Installed as a plugin, the hooks make no network request: the logbooks stay on your company's machines.
  • Readable without Baton. Each logbook is plain Markdown; a colleague or a manager reads it in any editor, and a task folder handed to someone else carries its record.
  • A ledger. A git record of every logbook entry; an edited or removed entry is reported at the next session start.
  • MIT. Free for commercial use.

Each machine keeps its own task folders and its own board; Baton does not sync them.

Install

In Claude Code:

/plugin marketplace add StanimirTenev/baton
/plugin install baton@baton

Needs Python 3.8 or later; on Windows also Git for Windows. Then start a new Claude Code session: a line starting with 🧭 Baton confirms it is on.

Where it works, and what it does not do

  • It runs in Claude Code: the terminal, the IDE extensions, the Code tab of the desktop app.
  • In a claude.ai chat the hooks do not run: the plugin looks installed, but nothing is enforced.
  • Measured on our own machine, 22–29 October 2026: the Stop hook handed a turn back 43 times for a missing entry; 29 got the entry, 14 ended without one. Baton makes forgetting visible and hard, not impossible.

Source and help

Source, documentation and issues: github.com/StanimirTenev/baton. Baton is made by Elkan Electronic. For questions, or help setting it up in a team, write to office@elkan-electronic.com.