Networks fail; agents retry. To make retries safe, every non-GET request must send an Idempotency-Key header — a unique value per logical action (a UUID works well):

Semantics

For 24 hours, the Gateway remembers each (key, request body) pair and the response it produced:
  • Same key + same body → the original response is replayed; the action runs once.
  • Same key + different body409 IDEMPOTENCY_CONFLICT (you reused a key for a different action).
  • Key in flight409 while the first request is still processing.
Generate a fresh key for each distinct action. Reusing one key across different payloads is a conflict by design — it’s the guardrail that prevents double-sends and double-charges.