You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
claimant mode file: guard the silent-deletion single point of failure #10332
Problem (five words: silent mode deletion shadows claimant)
The opencode claimant's mode file (~/.local/state/opencode-claimant/mode on the laptop) is an unguarded single point of failure: when the file is missing, the claimant silently defaults to shadow mode (discovery only, no launches) with no signal. This has now bitten twice:
2026-11-08: mode file missing, claimant never launched anything until set to live by hand.
Third occurrence, 2026-11-15/16 (opencode-claimant scheduled fire, laptop).
Evidence from ~/.local/state/opencode-claimant/fires.jsonl and the fire captures:
claimant-fire-exec-20261115T233030Z.out: starting in live mode.
fires.jsonl entries 2026-11-16T00:16:21Z / 00:16:25Z / 00:16:32Z: mode shadow -> live -> shadow within 11 s. These are off the 5-minute fire grid, so manual or test-harness invocations, not scheduler fires.
Every fire after 00:16:32Z read shadow; the scheduled fires at 04:30:42Z and 04:35:22Z read a MISSING file.
So the deletion window is bounded: file present and live at 2026-11-16T00:15:27Z, three flips ending shadow by 00:16:32Z, gone by 04:30:42Z. The flips match the real-install mutation pattern in #8742 (tests can switch the real installation's mode); a harness that writes the mode file and removes it on teardown would produce exactly this sequence. No test in pm-stack/opencode-claimant/ references MODE_FILE or unlink, so attribution is still open from these logs alone.
Impact: the opencode lane has been shadow-only for ~4 h. No candidates existed in any of the four queues during those fires (cap_room 32 of 36, 4 active roots), so nothing was lost this time; the next real candidate would have stalled exactly as in the #9106 case.
The claimant did NOT recreate the file: restoring mode is an operator decision, and the fire recorded the state plus the warning instead. That covers the "record the mode it read and where from" acceptance item; the alerting half still depends on wiring #10141's warning into the health surface.
Read-only live verification, Nov 16 ~05:00 UTC: mode path still absent; recent claimant fires report shadow. The host-health collector completed successfully at 04:55:02 UTC, snapshot generatedAt=2026-11-16T04:55:02.830612+00:00 and claimantMode.state=missing. The currently running packaged aggregator’s /api/attention.json returns item watchdog:claimant-mode with the explicit missing-file/shadow/dispatch-stall reason. This verifies the alert on the actual active service, not just HTTP 200 or a source blob. The tracked #8742 shell harness really does write shadow, write live, run the claimant, then rm -f the literal live mode path, but no event yet proves it caused this disappearance. Keep #8742 isolation and incident attribution separate; no mode restoration or service changes in this check.
Drew authorized restoration Nov 16. Rechecked missing state and created the mode file atomically without overwriting any operator update; regular fires at 05:21:26Z and 05:22:07Z reported live with zero candidates and zero launches (no forced run). The 05:20 host-health snapshot was live and the missing-mode attention card cleared. #10612 merged the offline replacements for both dangerous Slice 1 scripts and Make test targets after 113 unit and four safety checks; it prevents that deletion path on updated checkouts, not proof it caused this incident. Keep incident attribution and any managed-mode hardening separate; no restart or silent auto-restore was added.
Fresh state: issue is OPEN, no labels. Checked the comments through 2026-11-16 05:30Z.
Status of the four acceptance items:
Visible alert on missing/unreadable mode file: done in part. Comment 2026-11-16 04:58Z verifies the watchdog:claimant-mode attention item on the live aggregator. Remaining: the alert is only proven on the live host, not as a regression test.
Record mode read and source at startup/heartbeat: partly done. The fire capture records the mode state (2026-11-16 04:37Z). Not yet confirmed that every startup logs the path it read.
Managed config instead of a bare file: open. No decision recorded. This is the hardening item that needs a design choice.
A missing file must not look like "summits just aren't launching": covered by item 1 on the live host.
Other facts from the thread: mode restored 2026-11-16 05:21Z under Drew's authorization. #10612 blocks the test-harness rm -f on the real mode path, but attribution of the 2026-11-16 deletion is still open.
Verdict: keep open. Not a closure candidate. The remaining work is items 2 and 3 plus attribution, and it belongs to the claimant owner (#9106/#10141 track). I did not route a new packet: item 3 needs a design decision first, and a worker packet now would duplicate work already in progress. Recommend the owner decide on managed config and add a regression check for the alert.
Triage — queue task 20565, openchamber scheduled lane (oc-code-03), 2026-11-18.
Fresh GitHub state (08:52 UTC): #10332 OPEN, no labels, no native blockers. The 2026-11-17 verdict still applies: items 1 and 4 are covered on the live host. Item 2 (startup logging of the mode path) and item 3 (managed config, which needs a design decision) remain open, with attribution of the 2026-11-16 deletion.
Verdict: triaged, keep open with the claimant owner (#9106/#10141 track). No follow-on packet enqueued, because item 3 needs a design choice before any worker packet makes sense.
Merged work, still open. Every pull request that references this issue has merged (#10612, #11794) and none is open, but the issue kept status:in-review. Tasks that name it as a blocker have been waiting on it.
status:in-review is removed. Whoever takes this next: run the issue's done check against main. Close the issue if it passes; if not, list what is left here and carry on with it (AGENTS.md, "Finishing work").
Activity
developing-today commentedon Nov 14, 2026
CODE-3724
dezren39 commentedon Nov 16, 2026
Third occurrence, 2026-11-15/16 (opencode-claimant scheduled fire, laptop).
Evidence from
~/.local/state/opencode-claimant/fires.jsonland the fire captures:claimant-fire-exec-20261115T233030Z.out:starting in live mode.fires.jsonlentries2026-11-16T00:16:21Z/00:16:25Z/00:16:32Z: modeshadow->live->shadowwithin 11 s. These are off the 5-minute fire grid, so manual or test-harness invocations, not scheduler fires.00:16:32Zreadshadow; the scheduled fires at04:30:42Zand04:35:22Zread a MISSING file.claimant-fire-exec-20261116T043039Z.erris the first capture carrying the Silent-failure surfacing: claimant mode + pm-git-sync health must be visible #10141 loud warning:mode file /home/user/.local/state/opencode-claimant/mode is MISSING - defaulting to shadow; dispatch will return mode_not_live and stall.So the deletion window is bounded: file present and
liveat2026-11-16T00:15:27Z, three flips endingshadowby00:16:32Z, gone by04:30:42Z. The flips match the real-install mutation pattern in #8742 (tests can switch the real installation's mode); a harness that writes the mode file and removes it on teardown would produce exactly this sequence. No test inpm-stack/opencode-claimant/referencesMODE_FILEorunlink, so attribution is still open from these logs alone.Impact: the opencode lane has been shadow-only for ~4 h. No candidates existed in any of the four queues during those fires (cap_room 32 of 36, 4 active roots), so nothing was lost this time; the next real candidate would have stalled exactly as in the #9106 case.
The claimant did NOT recreate the file: restoring mode is an operator decision, and the fire recorded the state plus the warning instead. That covers the "record the mode it read and where from" acceptance item; the alerting half still depends on wiring #10141's warning into the health surface.
dezren39 commentedon Nov 16, 2026
Read-only live verification, Nov 16 ~05:00 UTC: mode path still absent; recent claimant fires report shadow. The host-health collector completed successfully at 04:55:02 UTC, snapshot
generatedAt=2026-11-16T04:55:02.830612+00:00andclaimantMode.state=missing. The currently running packaged aggregator’s/api/attention.jsonreturns itemwatchdog:claimant-modewith the explicit missing-file/shadow/dispatch-stall reason. This verifies the alert on the actual active service, not just HTTP 200 or a source blob. The tracked #8742 shell harness really does writeshadow, writelive, run the claimant, thenrm -fthe literal live mode path, but no event yet proves it caused this disappearance. Keep #8742 isolation and incident attribution separate; no mode restoration or service changes in this check.dezren39 commentedon Nov 16, 2026
Drew authorized restoration Nov 16. Rechecked missing state and created the mode file atomically without overwriting any operator update; regular fires at 05:21:26Z and 05:22:07Z reported
livewith zero candidates and zero launches (no forced run). The 05:20 host-health snapshot was live and the missing-mode attention card cleared. #10612 merged the offline replacements for both dangerous Slice 1 scripts and Make test targets after 113 unit and four safety checks; it prevents that deletion path on updated checkouts, not proof it caused this incident. Keep incident attribution and any managed-mode hardening separate; no restart or silent auto-restore was added.dezren39 commentedon Nov 17, 2026
Triage verdict (repo-queue task 19233, openchamber scheduled lane, 2026-11-17 UTC)
Fresh state: issue is OPEN, no labels. Checked the comments through 2026-11-16 05:30Z.
Status of the four acceptance items:
watchdog:claimant-modeattention item on the live aggregator. Remaining: the alert is only proven on the live host, not as a regression test.Other facts from the thread: mode restored 2026-11-16 05:21Z under Drew's authorization. #10612 blocks the test-harness
rm -fon the real mode path, but attribution of the 2026-11-16 deletion is still open.Verdict: keep open. Not a closure candidate. The remaining work is items 2 and 3 plus attribution, and it belongs to the claimant owner (#9106/#10141 track). I did not route a new packet: item 3 needs a design decision first, and a worker packet now would duplicate work already in progress. Recommend the owner decide on managed config and add a regression check for the alert.
dezren39 commentedon Nov 18, 2026
Triage — queue task 20565, openchamber scheduled lane (oc-code-03), 2026-11-18.
Fresh GitHub state (08:52 UTC): #10332 OPEN, no labels, no native blockers. The 2026-11-17 verdict still applies: items 1 and 4 are covered on the live host. Item 2 (startup logging of the mode path) and item 3 (managed config, which needs a design decision) remain open, with attribution of the 2026-11-16 deletion.
Verdict: triaged, keep open with the claimant owner (#9106/#10141 track). No follow-on packet enqueued, because item 3 needs a design choice before any worker packet makes sense.
Merge pull request #11794 from developing-today/fix/claimant-mode-pro…
dezren39 commentedon Nov 22, 2026
Merged work, still open. Every pull request that references this issue has merged (#10612, #11794) and none is open, but the issue kept
status:in-review. Tasks that name it as a blocker have been waiting on it.status:in-reviewis removed. Whoever takes this next: run the issue's done check against main. Close the issue if it passes; if not, list what is left here and carry on with it (AGENTS.md, "Finishing work").By: Claude, 2026-11-22 flow review.
Generated by Claude Code