stop-messages-from

Stop messages from resurrecting dead or terminal attempts

Metadata

Statusdone
Assignedagent-888
Agent identityfbb2d89fe44d6b761bcb4b67748ab3d417f29df70a65f8d9403308f5bb2bab78
Created2026-07-26T11:48:17.160790889+00:00
Started2026-07-26T13:34:53.016110567+00:00
Completed2026-07-26T14:26:48.939719409+00:00
Tokens26814128 in / 45801 out

Description

Emergency objective

Eliminate the coordinator behavior logged as Resurrection: reopened due to N pending message(s). A message to a dead agent, terminal attempt, or terminal task must NEVER wake it, reopen the source, refresh liveness, make it ready, transfer ownership, or spawn work. Period.

Required semantics

  • Messages are durable inert data by default and remain inspectable/auditable. Delivery alone performs no task transition.
  • Only a currently live attempt explicitly persisted in Waiting(Message) with a matching task/attempt epoch and subscription may request one idempotent resume transition.
  • Messages addressed to dead/terminal/stale epochs are retained as undeliverable/history; they are not silently retargeted to a later attempt. A human must explicitly reopen/retry and may choose to import history.
  • Remove pending-message count from generic coordinator readiness, resurrection, liveness, reaper, and done-reconciliation logic. Daemon restart and historical unread messages remain inert.
  • Repeated/duplicate messages are idempotent and cannot generate spawn storms. Preserve ordinary messaging to live workers and chat surfaces.
  • Add an exact operator diagnostic showing message state/recipient epoch without implying execution state.

Validation

  • RED-first regression reproduces Done -> pending message -> Open -> spawn on the old code.
  • Real daemon/CLI smoke: send many messages to Done, Failed, Abandoned, dead-attempt, and stale-epoch recipients; statuses, readiness, liveness, attempts, worktree ownership, and spawn count remain byte-for-byte unchanged.
  • Explicit live Waiting(Message) resumes exactly once on its matching message and no other message.
  • Live worker messaging still delivers normally without changing task status.
  • Restart with historical pending messages causes zero resurrection/spawn.
  • Permanent owned smoke scenario and grow-only manifest entry land.
  • Global binary is installed; focused tests, cargo fmt --check, cargo clippy, build, and smoke pass.

Depends on

Required by

Messages 7 messages (7 unread)

  1. #1user2026-07-26T11:52:06.449668666+00:00delivered
    The already-running authoritative lifecycle task was instructed to land the emergency message-inertness patch first after a live `.respond-*` resurrection. Treat that commit as candidate input: independently run the full RED/live matrix, fill any missing direct-reopen or child-responder paths, then install globally. Avoid parallel duplicate implementation.
  2. #2quality-pass-dead2026-07-26T12:00:54.781095602+00:00delivered
    Architecture gate complete: follow docs/design-dead-message-resurrection-hotfix.md. Keep the diff scheduler-authority-only; preserve/audit messages; bind at acceptance to attempt epoch; only atomic live Waiting(Message) may request one resume. The doc contains the required behavior matrix, real-daemon spawn/transition fingerprint smoke, legacy migration, mixed-version warning, and safe rollback. Reject any solution that deletes/marks-read messages or only checks final status.
  3. #3implement-authoritative-lifecycle2026-07-26T12:17:52.604958584+00:00delivered
    Emergency implementation is being landed here per user: coordinator pending-message resurrection and automatic  creation are removed. Please remain independent verification only and do not modify coordinator/message lifecycle seams; validate installed daemon behavior once my commit is pushed.
  4. #4implement-authoritative-lifecycle2026-07-26T12:17:59.216675032+00:00delivered
    Correction: please verify the .respond-* non-creation invariant independently; do not modify coordinator/message lifecycle seams.
  5. #5implement-authoritative-lifecycle2026-07-26T12:24:01.907435373+00:00delivered
    Emergency implementation c29ed648 is pushed and exact commit installed globally. Please independently exercise the live daemon against terminal messages and verify no reopen or .respond-* child; report evidence only.
  6. #6implement-authoritative-lifecycle2026-07-26T13:34:56.828921952+00:00read
    Authoritative lifecycle implementation is merged to main as 1a265631 (task commit 65b29a1a; emergency patch c29ed648). Permanent credential-free real daemon/CLI smoke tests terminal/open/running message neutrality, no .respond-* child, exact one-shot Waiting(Message) wake, stale worker fencing, restart idempotency, and ledger metadata. Please perform independent verification against merged main.
  7. #7stop-messages-from2026-07-26T13:35:05.709852949+00:00read
    Acknowledged — I will independently verify merged main/installed binary with the permanent real-daemon smoke and focused lifecycle/message tests, inspect for missing direct-reopen or responder paths, and make no duplicate lifecycle changes unless verification exposes a gap.

Log