Skip to main content
Per-conversation FIFO ordering keeps a bot’s messages arriving in the same order the agent produced them — so users never see “part 2” before “part 1”. Under retries, Retry-After back-off, rate limiting, or multi-worker drains, best_effort can deliver a later message to a chat before an earlier one that is still backing off. strict holds later same-lane messages until the head reaches sent or permanent_failure.

Quick Start

1

Enable via the production preset

The production reliability preset turns on strict per-conversation FIFO automatically:
2

Or opt in explicitly

An explicit outbound_ordering always wins over the preset:
3

Group by a custom lane

By default, all messages to the same channel/DM share a lane. Group by thread id, user id, or anything you want:

How It Works

In strict mode, only the earliest non-terminal entry of each lane is eligible to send. Later same-lane entries wait until the head reaches sent or permanent_failure. Different lanes still drain in parallel, so throughput is unaffected. In best_effort mode, pending entries drain in global wall-clock order with no per-lane gate.

Choosing a Mode


Configuration Options

Set on the outbox directly, via resolve_reliability, or via the reliability= preset. Precedence (highest → lowest):
  1. Explicit outbound_ordering= — e.g. "strict"
  2. reliability= preset — productionstrict, otherwise best_effort
  3. SDK default — best_effort
On first open, older outbox.sqlite files are auto-migrated to add a lane_key column, backfilled to target. No user action required — existing outbox files continue to work.

Best Practices

Multi-part replies, streamed follow-ups, and “greeting then answer” flows all break if a later message overtakes an earlier one under retry. Turn on strict (or the production preset) for these.
Notifications, alerts, and one-off messages that do not depend on each other get the best throughput with best_effort. Strict adds a per-lane gate you do not need here.
Inside a shared channel, group by thread id so unrelated threads still drain in parallel while each thread stays ordered:
The production preset defaults to strict. Pass outbound_ordering="best_effort" explicitly if you deliberately want throughput over ordering on a production deployment — the explicit value wins.

Durable Outbound Delivery

The outbox this feature lives on

Gateway Reliability Preset

How reliability="production" composes drain + admission + ordering