CHAPTER 09 · Data Modeling for Agents · 6 / 11
The snapshot-vs-current reconciliation
A subtle but common issue: a conversation message captures a point-in-time snapshot (e.g. "this edit was pending when the agent proposed it"), but some referenced facts are mutable (the edit was later accepted). You have two options:
- Update every historical snapshot when the underlying fact changes: expensive and error-prone.
- Reconcile on read: store the snapshot as-is, and when loading the conversation, re-read the current state of referenced mutable records and patch the snapshot before sending it to the client.
Option 2 is usually better: it keeps writes cheap and localised, and accepts a small read-time join to present current truth. Design your read path to reconcile snapshots against live records for any field that can change after it's recorded.