Uh oh!
There was an error while loading. Please reload this page.
1523: [factory] DM send reports success while delivery.status is recipient_unresolved for every recipient - #1525
Merged
Conversation
added 2 commits
August 15, 2026 16:07
The sender's agent token was shadowing the workspace credential used for the exact /v1/agents roster lookup. The preceding implementation commit separates those clients, keeps sends agent-attributed, preserves the delivery receipt, and makes both the CLI and MCP send_dm surface unresolved recipients as errors. Clarify that an unresolved send already created its message so retrying can duplicate it, and include the message id in the visible failure. Record the list_dms REST surface and the receipt helper in the feature map. Group DM paths do not use the single-recipient receipt and make no delivery claim. Regression coverage includes the CLI must-fire/must-not-fire pair, MCP error propagation, group-path isolation, and duplicate-warning wording.
agent-relay-codeBot
requested review from
khaliqgant and willwashburn
as code ownersAugust 15, 2026 16:08
Uh oh!
There was an error while loading. Please reload this page.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
agent-relay message dm sendreturns HTTP success and a realmessageIdwhiledelivery.statusisrecipient_unresolvedfor every recipient tried. The message is created in the conversation and never reaches the agent. Callers that read the top-levelmessageId— which is the obvious thing to read — believe they have communicated when they have not.This is a silent fleet-wide DM outage. It is currently masking coordination failures: a Chief brief containing four defect reports and a blocking data request was "sent" to a live, actively-working lead and never arrived, and the sender had message IDs suggesting otherwise.
Reproduction
Environment:
agent-relay11.6.3 (all paths converged: npm-global/mise,~/.agentworkforce/relay/bin,~/.local/binshim), brokeragent-relay-broker11.6.3, macOS, workspacerw_7ccfea89, nodechief-broker.Send a DM with any freshly registered, valid agent identity:
Response — note the top level looks like success:
{ "id": "214377632615854080", "messageId": "214377632615854080", "kind": "dm", "conversationId": "dm_77efecdf84952c3da8598b63", "from": { "id": "214015171589668864", "name": "chief-dmcheck-1536" }, "createdAt": "2026-08-15T13:40:10.000Z", "metadata": { "injection_mode": "steer" }, "delivery": { "status": "recipient_unresolved", "mode": "steer", "requestedRecipient": "relay-lead-0814", "resolvedRecipient": null, "recipientMatched": null, "readConfirmed": false, "note": "Recipient resolution was unavailable for relay-lead-0814; enqueue is not reported as successful delivery." } }Scope — what was controlled for
Every one of these returned
recipient_unresolvedwithresolvedRecipient: null:relay-lead-0814(live pty, actively working)recipient_unresolvedfactory-lead(live pty)recipient_unresolvedmarketing-lead(live pty)recipient_unresolvedrecipient_unresolved--mode wait(default)recipient_unresolved--mode steerrecipient_unresolvedrecipient_unresolved--workspace-keypassed explicitlyrecipient_unresolvedSo it is not recipient-specific, not the
wait-mode idle-boundary queueing, and not a missing workspace key.Contrast:
agent-relay message post <channel>returnsdelivery: null— it makes no delivery claim — and the posted message is readable back out of the channel. Channel posting works. DM delivery does not.Negative control — the message genuinely never arrives
A DM was sent to
relay-lead-0814containing a unique marker,CHIEF-STEER-PROBE-7731, in--mode steer.relay-lead-0814was demonstrably alive and working throughout: its session transcript had 3,839 entries with writes continuing during and after the send.grepfor every distinctive phrase from two earlier real briefs sent the same way — the sender namechief-dmcheck,FROM CHIEF,12:06:00.842,durable_object_overloaded,Skip.app— returned 0 for all.The recipient was alive and the messages were never delivered.
Why this is worse than the outage it replaced
relay#1518fixed a hard failure wheredm sendthrewWorkspace key required (rk_live_...), by making recipient resolution degrade rather than throw. The degrade path is honest —delivery.notesays exactly what happened — but it is easy to miss, and the caller now gets HTTP success plus a real message id.The prior behaviour failed in a way nobody could miss. The current behaviour fails in a way almost everybody will miss. A fix that converts a loud failure into a quiet one has not finished; the enrichment that could not fail gracefully is now failing gracefully into non-delivery.
What needs to happen
resolvedRecipientisnullfor live, registered, currently-running agents in the same workspace and on the same node as the sender. Resolution previously went throughGET /v1/agents, which requires a workspace key; determine what it uses now and why it returns nothing even when a workspace key is supplied. Start from therelay#1518change (75e969a96, "stop dm send from blocking on a workspace-only roster read") andrelay#1468(3267b1b19, "expose direct-message enqueue state").agent-relay message dm sendmust exit non-zero, or at minimum print a clearly visible warning, whendelivery.status != delivered. Returning amessageIdas the headline result of an undelivered message is the defect that hid this. Do not remove thedeliveryobject — it is the only reason this was diagnosable. Make the CLI read it.messageIdis returned would pass against the broken build and is not acceptable coverage here.send_groupand the MCPsend_dmtool share the path, and whether they report or swallow the same state.Definition of done
send_dmandmessage dm send_groupwere affected, and what was done about them.Notes for whoever picks this up
messageId. Verify it by finding a unique marker in the recipient's session transcript. That is the only check that distinguishes this bug from a fix.Fixes#1523