Skip to content

msg dead: global listing is unreachable from inside tmux — silently scopes to the caller's session #693

Description

@dotdevdotdev

Goal

agentwire msg dead (no -s) and MCP msg_dead (no session) are documented to list dead letters for EVERY session. In practice cmd_msg_dead (agentwire/msg_cli.py:212) falls back to _current_session(), so any invocation from inside a tmux session — which is every agent, including monitoring orchestrators and the MCP server — silently scopes to the caller and reports "No dead-lettered messages." even when other sessions have dead letters.

Observed

2026-07-04: a dead-lettered done for recipient agentwire-dev existed (visible via msg dead -s agentwire-dev and doctor), while an orchestrator's msg_dead with no session returned "No dead-lettered messages." — with no scope hint in the MCP rendering, so it reads as a clean global check. Monitoring loops are blind to every graveyard but their own.

Fix

  • Omitted -s should mean GLOBAL (inbox.dead_sessions()), matching the docstring, the MCP docstring, and msg dead --purge (which already treats no-session as all-sessions — the current asymmetry means msg dead shows nothing but msg dead --purge would clear everything).
  • If caller-scoped default is kept for some reason, the output and MCP rendering MUST state the scope explicitly.
  • Update tests.

Verification

From inside a tmux session, with a dead letter belonging to a different session: bare agentwire msg dead and MCP msg_dead list it.

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

Built by dotdev.dev

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:bugNon-app work category: bugfeature:cliApplication feature

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions