fix-resume-waiting-operator

Fix operator resume for waiting tasks

Metadata

Statusdone
Assignedagent-909
Agent identityfbb2d89fe44d6b761bcb4b67748ab3d417f29df70a65f8d9403308f5bb2bab78
Created2026-07-27T06:30:24.054894431+00:00
Started2026-07-27T06:31:25.417653454+00:00
Completed2026-07-27T07:10:08.064450513+00:00
Tokens16837754 in / 34476 out

Description

Objective

Make the documented wg resume TASK command correctly resume an explicitly Waiting task, including fail-closed legacy message waits like prototype-clearer-tui, without graph surgery, false failure/incomplete retries, or message-triggered resurrection.

Required behavior

  • For Status::Waiting, wg resume TASK must atomically append a fenced lifecycle WaitSatisfied event with actor=Operator and an operator receipt, transition Waiting→Open, clear the active wait condition, disarm any message subscription, clear stale assignment, preserve the prior worktree/checkpoint and exact Pi session ID for continuation, and kick dispatch.
  • This is explicit operator authority only. Ordinary messages—including legacy_unbound messages—remain inert and cannot invoke this path.
  • Preserve existing paused-draft/subgraph wg resume behavior byte-for-byte. Waiting resume acts on only the named task unless a separately explicit supported scope is implemented and tested.
  • Repeating resume must be idempotent/actionable, never duplicate a generation, attempt, or process.
  • Update misleading help/quickstart text if needed.

Live recovery

After installing the fixed binary, do not mutate prototype-clearer-tui from this worker. Log that the operator may safely run wg resume prototype-clearer-tui --only; the chat agent will perform that explicit command after validation.

Validation

  • RED regression proves current wg resume rejects a Waiting legacy-unbound task.
  • Waiting→Open is represented by exactly one fenced WaitSatisfied lifecycle event with Operator authority.
  • Wait state/assignment are cleared while session ID, checkpoint, and worktree WIP remain preserved.
  • Legacy/unbound and ordinary messages remain inert before explicit operator resume.
  • Dispatcher launches exactly one resumed attempt; no retry_count increase and no failed/incomplete transition.
  • Paused draft and downstream resume tests remain unchanged.
  • cargo fmt --check, focused tests, clippy/build, install, and owned smoke pass.

Depends on

Required by

Log