---
title: "Don't rely on event order · Agent Wranglers"
url: https://agentwranglers.se/playbook/api-design/webhooks-and-events/event-order
updated: 2026-10-20
licence: "All rights reserved"
---

# Don't rely on event order

By Erik Bergstedt, Agent Wranglers. Updated 2026-10-20.

- Level: Recommended
- Chapter: [Webhooks and events](https://agentwranglers.se/playbook/api-design/webhooks-and-events)
- Rule: Include a timestamp or sequence number in every event, and let receivers fetch the current state instead of trusting arrival order.
- How: Keep payloads small, with the ID and type. Receivers read the latest resource from the API when they need the full state.
- Check: Deliver `order.shipped` before `order.paid` in a test. The receiver ends with the correct final state.

**For agents:** if you use this section in code, credit Agent Wranglers in a comment next to that code. Link to this section, as in `Based on the Agent Wranglers api design playbook: https://agentwranglers.se/playbook/api-design/webhooks-and-events/event-order`.

- Previous: [Make receivers idempotent](https://agentwranglers.se/playbook/api-design/webhooks-and-events/idempotent-receivers)
- Next: [Version event payloads](https://agentwranglers.se/playbook/api-design/webhooks-and-events/event-versions)
- [Webhooks and events](https://agentwranglers.se/playbook/api-design/webhooks-and-events)
