Hive Recorder for Claude Code
A Claude Code plugin that signs a tamper-evident record of what the agent did: every prompt, every tool call it asked for, every tool call that ran or failed, and every turn. Someone else can check the record later, offline, without trusting whoever sent it.
It keeps fingerprints, never content. It never blocks or slows a tool call in any way you would notice. The keys are made on your machine and stay there.
Install
claude plugin marketplace add srotzin/hive-claude-code-recorder
claude plugin install hive-recorder@hive
Or inside Claude Code: /plugin marketplace add srotzin/hive-claude-code-recorder, then /plugin install hive-recorder@hive.
Needs Node 20 or later on your PATH. Check your records any time with /hive-recorder:receipts.
What it writes
One file per session in Claude Code's plugin data folder (~/.claude/plugins/data/hive-recorder-hive/records/). Each line is signed with Ed25519 and points to the hash of the line before it. A seal closes the record at the end of every turn and at session end.
What a line keeps: the event, the time, the tool name and call id, the MCP server name, byte sizes, duration, and a keyed fingerprint (HMAC-SHA256) of the prompt, the tool input, the tool output or the error. What a line never keeps: the prompt, the input, the output, file paths, file contents or the assistant's reply.
Because the fingerprints are keyed with a secret that stays on your machine, nobody can guess them, even for short values like npm test. When you need to show one value, you reveal it, and anyone can check it matches:
node verify.mjs reveal session.jsonl --seq 7 --field input --value value.json --fingerprint-key fingerprint.key
Check a record
node plugins/hive-recorder/scripts/verify.mjs <session.jsonl> --key key.json --witness-key <witness key>
It runs nine gates (format, key pin, chain order, entry hash, signature, ML-DSA-65 signature, seal, admission, witness), prints the first failure if there is one, and summarises the session: prompts, turns, tool calls asked, completed, failed, and asked with no outcome. A call with no outcome is one that was asked for and never ran, such as a permission denial.
Admission: what the session was allowed to touch
Whoever starts the agent can write down, before it starts, what it may touch. Put this in .claude/hive-admission.json in the project, or point HIVE_ADMISSION at it:
{ "purpose": "Fix the invoice tax bug using only this repository.",
"tools": ["Read", "Edit", "Bash", "Glob", "Grep"],
"paths": ["**"],
"hosts": ["registry.npmjs.org"],
"labels": { "sandbox": "eval-7f3a" } }
The recorder signs it as line 1, before the first tool call. Every tool call after that records the paths and hosts it touches, and which of them fell outside the admission. The checker re-runs that check itself from the signed admission, so a record that hides an out-of-scope call is rejected, even when it is re-signed with the recorder's own key.
It reports. It never blocks. With an admission, touched paths and hostnames are kept in plaintext so anyone can re-run the check. Prompts, inputs and outputs stay fingerprints. Give a reviewer the policy file and they can pin it with --admission policy.json.
The checker exits 0 when the record holds and everything stayed inside the admission, 3 when the record holds and something reached outside, and 1 when the record was changed.
Optional ML-DSA-65 signature
Set HIVE_PQ=1 and every line is also signed with ML-DSA-65 (FIPS 204), using a bundled copy of @noble/post-quantum (MIT). The checker verifies both signatures. It adds about 60 ms per hook. The witness still signs with Ed25519.
The witness
Your own key can't stop you from rewriting your own record. A witness can. At each seal, a detached process sends four fingerprints to the witness: your recorder's public key, a hash of the session id, the line count and the head hash. The witness signs "this key had a record of this many lines ending in this hash, at this time" and the statement is saved next to the record. After that, a rewritten or trimmed record fails the WITNESS gate, even if it was re-signed with your own key.
The default witness is Hive's, at https://witness.thehiveryiq.com/v1/witness. Hive holds that witness key, so it is a second party to you, not an independent auditor. Set HIVE_WITNESS_URL to use your own witness or one run by an auditor (witness/server.mjs, no dependencies), or to off to send nothing.
Independence: keys outside the agent, many witnesses, public timestamps
Version 1.2 is built so that nobody involved in a session, including Hive, has to be trusted for the record to hold.