Skip to content

Log every local send_relay_message with idempotency key, message id, latency and outcome (support traceability) #2289

Backlog

Description

@khaliqgant

Why

A customer's send_relay_message from a Codex Desktop chat timed out after 300s (Codex's client limit) and the message never arrived. We could not trace it: the server's idempotency record expires after 24h and no log ties a send's idempotency key to a message id. Today's repro on Desktop 2026.11.21 delivered immediately, so the original cause is unknown. Support card CSI2-5.

Ask

In the local Desktop send path (Desktop MCP → broker/relay-node → Relaycast write), emit one structured log line per send with: idempotency key (or a hash of it), resulting message id (or failure code), recipient, total latency, and per-stage timings (local accept, upstream write, receipt). Keep it in the Desktop's local diagnostic logs long enough for a support trace (≥7 days), and include it in any diagnostics bundle a user can export. No message bodies.

Also: the local path should fail fast with a clear error rather than leave the Codex tool call hanging until its 300s client limit; cap the wait at something well under that and return the receipt state.

Companion cloud change covers the hosted path (cloud packages/web/lib/mcp/relay-service.ts).

🤖 Generated with Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions