Separate decisions from effects
A replayable system records the inputs that influenced a decision. This includes time, randomness, remote responses, and configuration. Re-running a decision should not accidentally repeat a payment, send a message, or modify a production repository.
A small event envelope
{
"eventId": "example-001",
"type": "task.requested",
"version": 1,
"payload": { "taskId": "task-42" }
}
Store the original event before processing. Use a stable event ID for deduplication. Commit consumer progress after the durable effect, with a transaction or an explicit idempotency strategy where possible.
What replay cannot promise
A remote model response is not deterministic. Record it as evidence and distinguish playback of an observed response from a fresh model invocation.
See idempotent consumers for the reference checklist and agent boundaries for execution constraints.