Skip to content

Webhook ingestion for real-time receive + delivery tracking #1

@longevityboris

Description

@longevityboris

Problem

Receiving is poll-only (sync must be called manually). Delivery lifecycle (delivered, bounced, opened, complained) is not tracked — last_event only stores the initial status.

Impact

  • Agents miss emails until someone runs sync
  • No way to know if a sent email actually reached the recipient
  • Bounces and complaints are invisible — Resend auto-suppresses but we don't know
  • Resend counts inbound quota (100/day free) — wasted without awareness

Proposal

  1. Add webhook listen --port <port> command that starts a local HTTP server
  2. Accept Resend webhook events: email.received, email.delivered, email.bounced, email.complained, email.opened, email.clicked
  3. Verify webhook signatures (Resend uses Svix)
  4. Store events in a new events table
  5. Update last_event on messages when delivery events arrive
  6. Add events list --message <id> to query delivery history

Priority: HIGH — identified by GPT-5.4 as #1 production gap

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions