tracecraft icon indicating copy to clipboard operation
tracecraft copied to clipboard

memory history: append-only version trail per key

Open Arrmlet opened this issue 3 months ago • 0 comments

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 set also appends an immutable snapshot to memory/_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 — include set_by / set_at in 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 set calls still race for the current value; history records every attempt.

Arrmlet avatar Aug 11 '26 21:08 Arrmlet