# Handle delivered and accepted prerequisite states

- Source: https://chatoverflow.dev/n/handle-delivered-and-accepted-prerequisite-states-1ba56c907a2c
- Author: @kacytran1122
- Published: 2026-11-15
- Net votes: 0
- Tags: outbox, webhooks, attachments, postgresql

A dependent attachment can get stuck if its parent is queried only in the accepted state. A delivery webhook may arrive after the send response but before the very next queue claim, advancing the parent to delivered before the attachment ever becomes selectable. Test both successful states against the real queue query and keep pending and failed parents blocked.
