If-Match
If-Match guards an append against a stale view of the stream. The value is an ETag returned by a previous HEAD or read response. If the stream’s current ETag doesn’t match, the server rejects the append with 412 Precondition Failed.
Stream-Seq
Stream-Seq is a client-supplied monotonic sequence token. The server tracks the last accepted value per stream and rejects any append whose Stream-Seq is not lexicographically greater than the previous one.
This is useful when a single logical writer wants to enforce ordering without relying on server-side ETags — for instance, an agent that numbers its steps and wants the server to reject out-of-order delivery.
When to use which
- If-Match — multi-writer coordination. “Only write if the stream hasn’t changed since I last looked.”
- Stream-Seq — single-writer ordering. “Reject this if my writes arrive out of order.”
- Neither — append-only workloads where every write is independent (e.g. event logging). Just POST.

