Incoming events
Verify the Standard Webhooks signature, persist the event under itsevent_id, and return 2xx before model or tool work. Relay retries eligible
failures and may redeliver after a lost settlement, so the receiver must make
processing idempotent.
The webhook body is Linq’s v3 envelope. webhook-id and event_id carry the
same stable deduplication key.
Outgoing messages
Create a stablemessage_id for every logical send and reuse it on retry.
Derive the reply’s message ID from the incoming
event_id. A duplicate
webhook then repeats the same write instead of creating another message.
Delivery and read state
Receipts are monotonic watermarks through a conversation sequence:message.delivered and message.read when the corresponding
watermark advances. Read implies delivered, and conversation history projects
the watermarks onto each message.
Delivery never starts typing. Typing alone never marks Read.
Recovery
After an uncertain write, retry with the samemessage_id. After uncertain
local state, reload conversation history and
reconcile from canonical messages rather than webhook delivery attempts.

