Roll-up: a workspace whose container was removed outside Nexus reads as "nothing needs you" #198

Open
opened 2026-09-23 14:29:34 +02:00 by lz · 0 comments
Owner

Found in the final review of #155's branch (feat/mcp-status). Same class as the exited hole that branch closes, and it is still open.

The case

A container removed outside Nexus (docker rm, or a daemon wipe) leaves its workers row at status: 'running' and provision_phase: null, while the fleet store holds no entry. So live_status is null.

  • The roll-up does not flag the workspace. workspaceProblem ($lib/attention-rollup.ts) only flags exited for live_status of exited or dead. It reads null as "no observation", which is correct for a workspace the stream simply has not reconciled yet (AGENTS.md fact #41: an absence of information is not a diagnosis).
  • The session items are wrong. isRunning falls back to status when live_status is null, so the sessions derive from a stale claude_alive. Depending on what was last recorded, nexus_get_status reports one of two wrong answers:
    • "nothing needs you";
    • N errored items, each saying "Restart it", when the real remedy is at the workspace level.

What distinguishes it

null is ambiguous today: not reconciled yet and container gone look the same. Only the second needs the operator. The fleet layer already knows the difference after a reconcile, because reconcileFleet lists every managed container. An orphan row, one with no container at all, is a positive observation of absence, not a missing one.

Shape of a fix (not designed)

Let the store carry "reconciled, and no container exists" as a distinct state, so the roll-up can report a workspace problem such as missing with the action "Its container is gone. Delete the workspace, or start it to recreate." Two things to keep in mind:

  • Keep the "not reconciled yet" case silent.
  • Check the interaction with startWorker's recreate path: it destroys and recreates a container while the row survives, so a transient "gone" must not flash an item.

Rare in practice. Filed so the exited fix is not mistaken for full coverage of "the container is not what Nexus thinks".

Found in the final review of #155's branch (`feat/mcp-status`). Same class as the `exited` hole that branch closes, and it is still open. ## The case A container removed outside Nexus (`docker rm`, or a daemon wipe) leaves its `workers` row at `status: 'running'` and `provision_phase: null`, while the fleet store holds no entry. So `live_status` is `null`. - **The roll-up does not flag the workspace.** `workspaceProblem` (`$lib/attention-rollup.ts`) only flags `exited` for `live_status` of `exited` or `dead`. It reads `null` as "no observation", which is correct for a workspace the stream simply has not reconciled yet (AGENTS.md fact #41: an absence of information is not a diagnosis). - **The session items are wrong.** `isRunning` falls back to `status` when `live_status` is null, so the sessions derive from a stale `claude_alive`. Depending on what was last recorded, `nexus_get_status` reports one of two wrong answers: - "nothing needs you"; - N `errored` items, each saying "Restart it", when the real remedy is at the workspace level. ## What distinguishes it `null` is ambiguous today: *not reconciled yet* and *container gone* look the same. Only the second needs the operator. The fleet layer already knows the difference after a reconcile, because `reconcileFleet` lists every managed container. An orphan row, one with no container at all, is a positive observation of absence, not a missing one. ## Shape of a fix (not designed) Let the store carry "reconciled, and no container exists" as a distinct state, so the roll-up can report a workspace problem such as `missing` with the action "Its container is gone. Delete the workspace, or start it to recreate." Two things to keep in mind: - Keep the "not reconciled yet" case silent. - Check the interaction with `startWorker`'s recreate path: it destroys and recreates a container while the row survives, so a transient "gone" must not flash an item. Rare in practice. Filed so the `exited` fix is not mistaken for full coverage of "the container is not what Nexus thinks".
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
lz/agent-nexus#198
No description provided.