Skip to content

Ticket #76 — state truth: stale working, streaming ghosts, queued user color, delegation order ​

Root causes and fixes ​

  1. Grey user messages. Queued user bubbles (mostly DMs while an agent is busy) used colors.muted for the edge/header, so they read grey. They now use colors.warn (amber) for edge/header while queued, with colors.good (green) once sent; body stays readable. The user bubble now reads as colored rather than muted.
  2. Stuck working…. A parent left awaitingChildren after all real children were terminal was never reconciled, and automatic completion-delivery hops were counted as synthesis children, so a fast child/auto-hop could leave a parent working with no live run. Added reconcileWaitingWork() and called it on snapshot, diagnostic, and pump paths: it clears awaitingChildren with no live children, synthesizes/finalizes parents, re-queues stale working rows with no run/claim, and excludes handoff.completion hops from synthesis children. maybeSynthesize excludes completion deliveries too.
  3. Streaming ghost. finalizeStream epoch guards returned before clearing/persisting streaming, leaving orphaned live rows until the 120 s age filter. Finalization now settles (clears streaming, persists) on both epoch paths and returns undefined only as the staleness signal. Added settleTerminalStreams() on snapshot/diagnostic reads to settle any streaming message whose task is missing or terminal (interrupted only on failure/cancellation). The live activity partition also ignores streaming rows whose task is terminal.
  4. Delegation order. Sequential user tasks and a delegated child+later-user-task now settle in order; red/green tests prove no stuck work. Empty/whitespace assistant replies are retried then fail visibly instead of finalizing as success or creating a completion handoff.

Verification ​

Environment: Node v26.12.1, host OpenCode v2.2.5 vs pinned types 2.2.1, Linux/tmux.

CommandResult
npm run checkexit 0
npm test374 passed, 0 failed
npm run test:live:fakepassed (3 consecutive runs)
npm run test:live:fake:emptypassed
npm run test:livepassed

No skips. Remaining uncertainty: user-bubble hue is visual (text capture cannot verify color); stale-run detection uses the in-process run map (single-process deployment); no macOS run; the queued-line count race is deterministic after the composer-cleared gate but relies on the harness settle.

Released under the MIT License.