A scheduled post fires. The request to publish it goes out. The network hangs. After 30 seconds, our client times out. We retry. The tweet publishes. Then the original request completes too — and a second, identical tweet goes out.

That's a double-post. On a personal account it's embarrassing. On a client account at an agency it's a support ticket and a credibility hit. Either way, it's the single most visible failure mode in any posting system, and it's caused by one of the most common conditions in distributed systems: ambiguous outcomes under timeout.

At HelperX, we ship scheduled posts, replies, and DMs across hundreds of accounts. Every one of those actions can time out, retry, and double-execute. This article is about how we prevent that with idempotency keys — the same pattern payment systems use to prevent double-charges, applied to social actions.

The problem, precisely

A timeout is ambiguous. When a publish request times out, the action is in one of three states: