checkpoint-resume
A Hermes plugin that re-arms your working status after a context compaction or a new session — without
waiting for the user to ask for it.
On post_compaction, on_session_open and on_session_start it runs the local commands you
configure, stores their real output as pending per-session state, and on the next pre_llm_call returns
that output as {"context": ...} so Hermes appends it verbatim to that turn's user message, once.
Unconfigured it runs nothing and injects nothing: zero token cost until you point it at something.
It is not a memory system, not a compressor, and not a task tracker. It is the small seam between
"something just got summarised away" and "here is the live output of my own status commands".
Why this shape (read from hermes-agent source, 2026-12-01)
post_compactionfires on every committed compaction (agent/compaction_events.py,
fire_post_compaction) — auto, manual, gateway, Codex, micro, prune — but it is an observer: its
return value is ignored, so it cannot put text into the model's context.pre_llm_callis the hook that can: returning{"context": "..."}appends the text to the current
turn's user message (agent/turn_context.py,_collect_pre_llm_call_context).- So a boundary event cannot inject by itself. This plugin splits it in two: the boundary arms a
digest, the nextpre_llm_calldelivers it. - Turn order matters: in a turn that starts above the compression threshold,
_collect_pre_llm_call_context
runs beforerun_turn_start_compaction(same file, comment "Before turn-start compaction"). A digest
armed by that compaction therefore lands on the next turn, not on the turn that compacted. Verified
live:armed digest … 00:34:40→injected 702 chars … 00:47:28, same session.
Install
hermes plugins install <owner>/checkpoint-resume # or a git URL
hermes plugins enable checkpoint-resume
Configure — this is the part you must do
Status text is injected only for the commands you list. Add to ~/.hermes/config.yaml:
plugins:
entries:
checkpoint-resume:
enabled: true
settings: # where Hermes stores a plugin's own settings (`config:` is still read, legacy)
inject_commands:
- label: "open work items"
argv: ["/usr/bin/python3", "/path/to/your/open_items.py"]
cwd: "/path/to/your/vault"
- label: "checkpoint self-check"
command: "/usr/bin/python3 /path/to/your/checkpoint_check.py"
note: "Resume from the declared next step; do not re-run finished steps."
| Key | Default | Meaning |
|---|---|---|
inject_commands | [] | Commands to run at each boundary. argv list, command string, or {label, argv|command, cwd}. Empty means the plugin never injects. |
max_commands | 6 | Cap per digest, bounds the cost of one injection |
max_chars | 2600 | Cap of the injected text |
command_timeout_seconds | 25 | Per-command timeout; keep it below plugins.hook_callback_timeout (core default 30 s) because these hooks run on bounded worker threads |
max_age_seconds | 21600 | An unconsumed digest older than this is dropped instead of injected late |
skip_subagents | true | Delegated child sessions do not get their own injection |
require_nonempty | true | Arm only when at least one command produced output |
note | "" | Optional fixed line injected above the command output |
Check it is working
hermes plugins validate . # manifest, hooks, capabilities, security scan, no core override
hermes plugins show checkpoint-resume
python3 tests/test_hooks.py # hook-level tests (add --real to use Hermes' PluginState)
grep -a checkpoint-resume ~/.hermes/logs/agent.log | tail
Expected log pair once a boundary happens:
INFO hermes.plugins.checkpoint_resume: checkpoint-resume: armed digest for session local-… (702 chars, store=PluginState, compaction kind=summarize reason=turn_start_threshold tokens 172390->31372)
INFO hermes.plugins.checkpoint_resume: checkpoint-resume: injected 702 chars into session local-…
Known boundaries (measured, not theoretical)
- Injection lands on the next turn, not the turn that compacted (turn-order note above).
- Persistence is per plugin process. If the armed digest could not reach
PluginState, it lives only in
process memory and a killed process loses it. Thearmedlog line reports which store was used
(store=PluginStatevsstore=in-process); the state file lives in~/.hermes/plugin-data/. - The injected text is a snapshot taken when the boundary fired. If your own status files change between
the compaction and the injection, the injected copy is stale. Recomputing insidepre_llm_callwould
fix that at the cost of 1–2 s on the injecting turn — deliberately not done here. - Callbacks are fail-open: a broken command or a failed state write logs at INFO and the turn proceeds
normally. So injection is not a guarantee; anything that must survive a compaction should also live
in files. - A new session often arms twice (
on_session_openandon_session_startfire on worker threads and
overlap). A claim is written before the command work so the second arm skips it, and injection still
happens once. requires_hermes: ">=0.23.1"— floor taken from the earliest Hermes release whose tag contains
on_session_open(commite412d4c6a4, in v0.23.1, released 2026-11-10). Older releases lack that
hook;post_compactionandpre_llm_callare older andPluginStatelanded in v0.21.6, so the
hook is what binds.
Disclosure
- No network calls. No LLM calls. No credentials. No telemetry. No self-updating code.
- It runs subprocesses — only the commands you put in
inject_commands— each with a timeout. - Read reach equals your scripts' reach: the plugin itself reads nothing outside its own
plugin-data/state file, but the commands you configure can read whatever they are able to read. - Writes only its own state file under
~/.hermes/plugin-data/(host quota 10 MiB, per-key size checked). - Extends Hermes only through the four hooks; it does not patch, wrap or rebind Hermes internals.
Not this plugin
agent-checkpoint and ctx_checkpoint in the Hermes catalog are different tools (budget / context
checkpointing), and constraint-vault re-injects pinned verbatim text on every turn. This one re-injects
live command output, only at a compaction or new-session boundary, and only when configured.
MIT licensed.
README from the reviewed commit 56d5d7d; it updates when the author re-pins.

lilao