Step-by-step answer
Stretch 45 min6 stepsMake a side-effecting tool safe to replay
A record_enquiry_draft tool for the contract-pack reader whose write is safe to repeat. The key is derived from the matter and the normalised enquiry text, not from ctx.callId, and checked inside a serialised read-check-write, so a re-run step, a retried call with a new ID, or two concurrent attempts all leave exactly one draft.
Back to the exercise