Show HN: Claude Code hooks that log every tool call, 124ms per call A new open-source tool called homestead-memory logs every Claude Code tool call in a hash-chained, tamper-evident local ledger at a median cost of about 124ms per call (138ms p95, measured on an M3 Pro with a 4KB tool response), with the hook running as a fresh process twice per call — roughly 61ms before and 63ms after — since version 0.4.0. The package, installable via pip for Python 3.10+ on macOS, Linux, and Windows, records both the decision before a tool runs and the outcome after, and can export the ledger in the IETF draft-sharif-agent-audit-trail-01 format, which maps to EU AI Act Article 12. The author warns that the AAT draft is an unadopted individual Internet-Draft with IPR disclosure 7558 declaring RAND licensing with a possible royalty or fee, so the --format aat export should be treated as a convenience rather than a compliance foundation, while the native Ed25519 EvidencePack carries no such disclosure. Stop renting your mind. A tamper-evident record of what your AI agent actually did , in a local file, that someone who does not trust you can verify. Tamper- evident , not tamper-proof: what it defends against and what it does not what-this-defends-against-and-what-it-does-not . Agents fail quietly. The run reports success, the tool returns 200, and the thing you asked for did not happen. There is usually no record to contradict it. This keeps one, and every entry is hash-chained to the one before it, so see it catch a forged record, live: pip install homestead-memory Python 3.10+, macOS / Linux / Windows hsm watch --demo 0 14:02:11 Bash npm test 1 14:02:19 Read src/api/billing.py 2 14:02:24 Edit src/api/billing.py ② now someone edits record 1… chain break at index 1: hash mismatch record content does not match its own hash edited in place exit 1 · gate it in CI like a test Got No matching distribution found ? macOS still ships Python 3.9 as its built-in python3 , and this needs 3.10+. Nothing is wrong with the package. Either use a newer Python, or skip installing entirely: uvx --from homestead-memory hsm watch --demo uv https://docs.astral.sh/uv/ fetches a suitable Python for you. hsm hook --install prints a Claude Code hook; you paste it, nothing is edited for you hsm watch what your agent did, in order Every entry is hash-chained to the one before it, so editing, deleting, or reordering any record breaks every hash after it. hsm watch reports the break at the exact index and exits non-zero. Sign it and a wholly rebuilt chain is caught too. Both phases are recorded, which is what makes it evidence rather than a log. The hook captures the decision before a tool runs and the outcome after. A record of outcomes alone shows what happened; it cannot show that anything was authorised first. As the IETF Agent Audit Trail draft https://datatracker.ietf.org/doc/draft-sharif-agent-audit-trail/ puts it, "a denial that is only logged after execution provides no evidence that the denial was enforced". hsm export --format aat the same ledger as draft-sharif-agent-audit-trail-01 That draft maps explicitly to EU AI Act Article 12, and this emits it alongside the native format rather than replacing it, so nothing already on disk changes. Where we differ we say so: it specifies ECDSA P-256, which the AAT export uses, while the native EvidencePack stays Ed25519 so its verifier can remain standard-library only and a recipient needs nothing installed. Know this before you rely on the AAT export. That draft is an individual Internet-Draft, not an adopted standard: it has no working group behind it and carries the usual notice that it "is not endorsed by the IETF". Its author has also filed IPR disclosure 7558 https://datatracker.ietf.org/ipr/7558/ , covering revisions 00 and 01 in full, declaring "Reasonable and Non-Discriminatory License to All Implementers with Possible Royalty/Fee". RAND with a possible fee is not royalty-free, and this package is MIT, which grants you no patent licence. We ship the export because interoperability is worth having and we have asked the author to clarify what implementers are taking on. Until there is an answer, treat --format aat as a convenience rather than something to build a compliance programme on. The native ledger and EvidencePack carry no such disclosure, and they are what the rest of this README argues for. What it costs you: about 124ms per tool call median; 138ms p95, measured on an M3 Pro with a 4KB tool response . Since 0.4.0 the hook records both phases, so it runs as a fresh process twice per call, once before your tool runs and once after: about 61ms and 63ms respectively. On a 100-call session that is roughly 12 seconds spread across the run. Almost all of it is Python interpreter and import startup rather than the recording itself. If that is too much for your loop, do not install the hook: the number is here so you can decide before you find out. Earlier releases documented 68ms, which was correct when only PostToolUse was recorded. Recording the decision phase is what makes the ledger evidence of enforcement rather than of observation, and it costs a second process. Stating the higher number rather than the one that flatters us is the same reason the rest of these figures are here. This is a file, not a platform. Agent observability tools are far richer than this and they want a deployment: the self-hosted ones document a production floor of several services and roughly 16 GB of RAM. This is pip install , one hook line, and a JSONL file on your disk. Different job. If you need dashboards, evals, and span analytics, use one of those. If you want a record you can grep and prove, use this. Secret-shaped values are redacted and payloads truncated to a 200-character head, with a SHA-256 of the full original kept so the evidence survives redaction. That is a mitigation, not a guarantee: no pattern list is complete. hsm export --evidence a pack anyone can verify with no install at all The pack carries the records, the signature, the public key, an integrity report, and a standard-library verifier a third party can read in full and run. It states what it does NOT prove, including that a signature only establishes origin if you already know which key to expect. Tamper- evident , not tamper-proof. The difference matters, so here it is plainly. It catches: - A record edited in place. The hash stops matching and hsm watch names the index. - A record deleted or reordered. Every hash after it breaks. - A silently dropped write. Drops are recorded and reported, never swallowed. - A whole chain rebuilt from scratch by someone who recomputed every hash, provided you ran hsm checkpoint , you pin the expected signer, and they do not hold your key . All three matter. A checkpoint verified without a pinned key is self-asserted: it checks the signature against whichever key sits beside it, so a rebuilt chain re-signed with the attacker's own key also passes. hsm verify --deep now says so when no key is pinned. hsm verify --deep --signer