BuildRiot
Sign in

Article · AI

Build a draft-first support agent with Resend Inboxes and test human handoffs

Resend Inboxes stores conversations and supports drafts and teammate assignment. This guide outlines a support prototype and tests for duplicate delivery, human takeover, simultaneous replies and approval before sending.

A sunlit miniature support workflow shows blue and lavender conversation drafts, duplicate-message clips, competing replies, a human handoff, and a frosted approval gate.
Illustration: BuildRiot (AI-generated)

Key takeaway

Shared conversation history helps people and agents coordinate, but reliable handoffs also need control over sending. Developers should bind approval to an exact message, preserve send decisions across retries and test every enabled reply path.

Start with a draft-first support workflow

Resend announced Inboxes availability for every Resend user in its Forward recap dated October 21, 2026. The product supports programmatic inbox creation and conversations for agents and teams. Its product page describes agents drafting replies and assigning work to people. A useful support prototype starts there: accept a customer message, prepare a draft and let a person review it. Sources: Resend

Resend distinguishes ordinary receiving, which delivers domain email to a webhook, from Inboxes, which stores, threads and organizes conversations. Inboxes also supports labels, attachments, forwarding, search, teammate assignment and inbox-event webhooks. These capabilities are available through its dashboard, API, command-line interface and Model Context Protocol server. Shared access makes handoff behavior important: a person may act while an agent prepares a reply. Sources: Resend

Resend’s product page does not specify concurrency or approval guarantees. The prototype and tests below are proposals; no live handoff tests were performed. Start with classification and drafts, and expose sending through a separate application service. Require human takeover to stop pending agent sends, approval to cover the submitted message and retries to produce no additional replies. Sources: Resend

Create an isolated inbox

Use a dedicated test address or subdomain and controlled recipients. Record the installed SDK version and actual API responses. Check endpoint support before building the workflow around it. Resend’s create-inbox reference provides this JavaScript example. Sources: Resend

const { data, error } = await resend.inboxes.create({
  emailAddress: 'support@example.com',
  name: 'Customer Support',
  fromName: 'Ada from Support',
});

Without forwarding, creation requires receiving enabled and verified DomainKeys Identified Mail and Sender Policy Framework authentication. The inbound mail exchanger record must be verified or pending. With forwarding enabled, those authentication checks suffice for creation, and Resend provisions a receiving address retrievable through Get Inbox. The existing mail route still needs configuration to deliver messages to that address. Documented errors include 422 for unmet domain prerequisites, 409 for an address already in use and 403 at the team’s inbox limit. Sources: Resend

Make approval a versioned application record

Connect one inbox to a webhook receiver, durable database or queue, drafting worker and human review interface. Keep conversation control separate from draft content so ownership changes can invalidate work already underway. Give each ownership change a new generation value, and record which generation produced each draft. The table below proposes records for tracing a send decision.

Table

Proposed records for tracing a support handoff

RecordFields needed for the experiment
Received eventProvider event ID, inbox/thread/message IDs, receipt time, processing state
Conversation controlOwner, ownership generation, latest observed message, workflow state
Draft revisionExact content, recipients, attachments, source-message version
ApprovalReviewer, approved revision, timestamp
Send intentStable operation ID, request hash, provider ID, pending/accepted/uncertain state
These application records connect each send decision to its conversation, draft and approval.

Show the reviewer the exact recipients, content, attachments and relevant conversation before approval. Bind approval to an immutable draft revision. At send time, check ownership and the conversation version again, then atomically reserve a send intent. Preserve the provider identifier and keep ambiguous outcomes pending reconciliation. The sequence below puts those checks in order.

  1. Verify and durably record the incoming event before acknowledging it.
  2. Fetch the current conversation and deduplicate the work.
  3. Generate a draft against a recorded conversation version.
  4. Present the complete proposed message for human review.
  5. Bind approval to the exact draft revision.
  6. Recheck ownership and conversation state, then reserve the send intent atomically.
  7. Submit through the verified endpoint and retain the provider identifier. Sources: Svix

An application lock coordinates only writers that respect it. If a person sends directly through Resend’s dashboard, the application database alone cannot guarantee exclusion. A final thread read also leaves a gap before submission unless the provider supports a conditional operation. Include both dashboard sends and application sends in the collision tests.

Separate duplicate events from uncertain sends

Svix recommends verifying signatures and storing or queueing events durably before acknowledgment. It also recommends deduplicating stable event identifiers behind a unique constraint and reconciling current resource state when ordering matters. Apply those controls so duplicate delivery produces one logical job. Preserve distinct messages with identical text; matching content should not erase a separate customer message. Sources: Svix

Check retry timing during integration: Svix’s published schedule differs from the approximate schedule in Resend’s webhook reference. Confirm which schedule applies to Inboxes before setting recovery expectations. The Resend reference illustrates acknowledgment before asynchronous processing and separates checking, handling and marking an event as processed. Back that sequence with durable storage and atomic operations to close crash and concurrency gaps. Sources: Svix, Resend

Outbound deduplication addresses another failure: resubmitting an intended reply after losing its response. Resend’s May 1, 2025, changelog documents email-send idempotency keys of 1–256 characters retained for 24 hours. Repeating the same request with the same key returns the original email identifier. Reusing a key with a changed payload returns a 409 invalid_idempotent_request error. Overlapping requests can return a 409 concurrent_idempotent_requests error and can be retried later. Verify the actual Inboxes sending endpoint’s behavior before relying on these semantics. Sources: Resend

Resend’s engineering account describes request-level checks of the key and normalized payload, and warns against generating a fresh random key for each retry. Keep a stable operation identifier and a durable application record beyond the provider’s retention window. Neither inbound deduplication nor outbound idempotency decides which of two different replies should win. Ownership and approval checks must make that decision before submission. Sources: Resend

Force the handoff races to happen

Use controlled barriers to pause work before draft persistence, before ownership validation and immediately before provider submission. While the worker is paused, let a reviewer take ownership, edit the draft or reply from the dashboard. Release the competing operations together and record what actually sends. Repeat through both the native dashboard and the prototype interface. The table below defines proposed tests and required observations.

Table

Proposed handoff tests and required observations

TestInjectionRequired observation
Duplicate webhookSubmit one event 20 times, including concurrent deliveriesOne logical processing job and one intended draft
Distinct identical emailsDeliver two separate messages with identical textPreserve both; do not deduplicate solely by content
Crash before acknowledgmentCommit event, then terminate receiver before respondingRetry recovers work without duplicating it
Human takes ownershipPause agent generation; assign thread to a person; resumeOld agent job cannot send
Human replies during generationSend from dashboard while worker is pausedAgent draft is invalidated or explicitly marked stale
Simultaneous repliesRelease dashboard and application send attempts togetherReport whether both send; do not infer exclusion from assignment
Approval invalidationChange text, recipient, CC/BCC, or attachment after approvalChanged revision requires fresh approval
New customer messageReceive clarification after approval but before sendingStale approval is blocked or returned for review
Double approvalTwo reviewers approve simultaneously; double-click SendOne send intent for that approved revision
Ambiguous sendDrop response after request reaches providerReconcile or retry safely; no new operation key
Use these scenarios to check duplicate handling, ownership changes and approval enforcement.

Extend these tests to worker crashes after draft creation, delayed replays after key expiry and older events arriving after newer ones. Recovery should find the existing draft, preserve the previous send decision and avoid moving conversation state backward. Also deliver an email that asks the agent to bypass review or forward another customer’s mail. Treat that text as customer content with no authority to grant permissions or approval.

Measure replies and set a release gate

Repeat each race scenario and report the trial count as an initial test size, not a reliability certification. Log event ordering, thread version, ownership changes, draft revision, approval, send intent and provider response. Count duplicate drafts separately from duplicate sends. Record unauthorized sends, stale approvals accepted and ownership conflicts. Measure crash recovery time and receipt-to-draft latency, including its median and 95th percentile.

Braintrust’s October 1, 2026, transactional-email comparison tracks recipient-specific emails and provider identifiers. Its study distinguishes provider acceptance from inbox delivery and predates the Inboxes launch. Apply that measurement discipline by recording acceptance, recipient-server delivery evidence and arrival at controlled mailboxes separately. A missing lookup should trigger reconciliation or lookup retries, not a fresh send. Sources: Resend, Braintrust

Before enabling autonomous sending, check whether agent credentials can be restricted to reading and drafting, and whether sends accept version preconditions. Verify which events expose human replies, assignments and draft changes. Require demonstrated human takeover, revision-bound approval and safe retry behavior across every enabled sending path. If dashboard collisions still produce two replies, document that boundary and keep the affected workflow under manual sending control.

Attribution

Sources

  1. 1ResendWhat you missed at Resend ForwardSource published (UTC)
  2. 2ResendInboxes
  3. 3ResendCreate Inbox
  4. 4ResendInboxes · The inbox for agents
  5. 5ResendIdempotency KeysSource published (UTC)
  6. 6ResendEngineering Idempotency Keys
  7. 7SvixWebhook reliability: a practical guide for senders and receivers
  8. 8ResendWebhooks events reference
  9. 9BraintrustResend vs Postmark MCP for transactional emailSource published (UTC)

Read the original source for full details and context.

Report a problem

Links, dates or what you expected. Do not include passwords or private data.

More on AI

All AI stories
Build a draft-first support agent with Resend Inboxes and test human handoffs · BuildRiot