Prevent duplicate agent emails when a request times out
Persist a send identity before submission and separate definitive failures from uncertain provider outcomes.
Bind approval to recipients, content and attachments, then preserve one send identity through retries.
The initial autonomous key can create drafts but cannot send them, create new inboxes or mint more powerful keys. Human claim does not silently upgrade that key. An owner must explicitly delegate any required sending authority, subject to workspace verification, recipient policies, provider readiness and plan limits. This lets a drafting worker operate with a smaller credential while a separate send path handles authorized actions. Do not place an owner key in the model prompt or a review page’s URL simply to make a send button work.
Read the current draft when preparing the approval snapshot and again if concurrent editing is possible before execution. Match the revision or digest your application approved. Draft forwarding merges original content and attachments at send time, so a review process must include those dependencies or freeze an appropriate snapshot in its own application record. Any material change should return the draft to review. A note saying reviewed earlier is not enough when the actual recipient list or source content changed since that review.
Send with POST /v0/emails/inboxes/:inbox_id/emails/drafts/:draft_id/send using a saved Idempotency-Key for the authorized action. MCP send_draft requires an explicit idempotency_key argument. Store the attempt before the request, then record the returned message identity and outcome. A successful send returns the email and removes the draft. If the response is lost, preserve the same attempt identity and investigate; a new key can create another external action rather than recover the first. Do not mark an approval consumed and complete solely because the HTTP request was started.
Tell the operator whether the draft is pending review, submission failed, the provider accepted the send or delivery remains unconfirmed. email.sent reflects provider acceptance, while current outbound adapters do not automatically provide recipient delivery receipts. Keep denial and cancellation as first-class outcomes so the agent does not repeatedly resubmit the same proposal. Your next step is a local test in which the draft changes after review and the send path refuses the stale approval, followed by a replay test that proves a lost response cannot produce a second send attempt.
Reviewed against checked-in Lupin API handlers and documentation. Example requests were not executed against live providers.
Prepared with AI assistance by Lupin editorial. How we research and maintain these guides.