Skip to content

msg send to a nonexistent session queues silently; target_gone escalation arrives ~24h late #694

Description

@dotdevdotdev

Goal

Three related holes in the gone-recipient lifecycle of polite messaging, found via a real loss: agentwire-dev-investigate-640 sent a load-bearing done to agentwire-dev (a session that no longer existed — likely a stale recorded parent; the live orchestrator was agentwire). It sat queued from 2026-07-03 07:52 to 2026-07-04 08:01 before dead-lettering with reason target_gone and emailing the owner.

Problems

  1. No send-time existence signal. inbox.enqueue / cmd_msg_send (agentwire/msg_cli.py) only report "no recipients" for @all. Sending to a named session that doesn't exist queues silently — the sender gets a normal "Queued" confirmation and never learns the target is gone.
  2. target_gone burns at the designed rate but took ~24h, not ~40 min. MAX_ATTEMPTS=40 at the ≤60s watchdog cadence should dead-letter in ~40 min; the observed gap was 24h. Investigate why attempts accrued so slowly for a gone target (sweep skipping gone sessions? drain not visiting them every tick?).
  3. A gone target can't un-go by itself, yet we retry 40×. Consider a much faster escalation path for target_gone (recipient can be recreated, so some grace is fine — e.g. a handful of ticks / a few minutes), and/or re-routing report-backs whose recorded parent is gone to a live orchestrator on the same project.

Fix (minimum)

  • msg send to a named nonexistent session: warn in the confirmation ("target does not currently exist — will dead-letter in ~N min unless it appears") in both text and JSON/MCP output.
  • Root-cause and fix the 24h-vs-40min latency for target_gone.
  • Decide + implement the fast-escalation grace window for target_gone (document the chosen semantics in docs/wiki/sessions/messaging.md).

Verification

Send a done to a made-up session name: sender sees the warning; dead-letter + owner email arrive within the documented window, not a day later.

Found during the 2026-07-04 messaging stress test.

Built by dotdev.dev

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions