tracecraft
tracecraft copied to clipboard
memory history: append-only version trail per key
Problem
tracecraft memory set is last-write-wins: setting a key overwrites the previous value with no record of what was there, who wrote it, or when. memory get also drops the set_by/set_at metadata that's already stored in the object.
For a tool whose core promise is nothing your agents do is lost, shared memory is currently the one place where things are lost.
Proposal
- Every
memory setalso appends an immutable snapshot tomemory/_history/<key>/<ts_ns>_<agent>_<uuid8>.json(same nanosecond+uuid key scheme messages use, so concurrent writers never collide). tracecraft memory history <key>— list versions with timestamp, agent, and value.tracecraft memory get <key> --with-meta— includeset_by/set_atin output.
Notes
- Works on every backend, including HuggingFace (append-only writes need no conditional put).
- The live key stays last-write-wins — this doesn't add locking, just an audit trail. Concurrent
setcalls still race for the current value; history records every attempt.