Skip to content

opencode-claimant: all live fires abort at cap since primary clone left on xaltha branch (cap_unknown, nothing launches) #12813

Closed

Description

@dezren39

Incident

Every live opencode-claimant fire since ~03:02 UTC 2026-11-23 aborts at the cap step: cap_room null, skips: [{reason: cap_unknown}], zero sessions launched, supervision skipped. Queue broker is healthy (queue_health rows present in the fire log); this is not the backend-outage fallback case.

Fire log (~/.local/state/opencode-claimant/fires.jsonl):

Root cause

The primary clone /home/user/git/code was checked out from main to xaltha/12751-read-authority at 2026-11-22 20:55:36 -0600 (reflog), between the last good fire and the first bad one. That branch's pm-stack/opencode-claimant/poll.py predates the #12225 paging fix: it escalates GET /api/session?limit= over (1000, 10000, 100000). The standing OpenCode server (2.0.30+9acf714, pid 1891329, up since 02:26 UTC) caps limit at 200 — ?limit=201 and ?limit=1000 both return HTTP 400 Expected a value less than or equal to 200 (verified repeatedly; auth fine, default list and /api/session/active both OK). So fetch_sessions() returns None on the first read and the fire fails closed per the cap rule.

main already contains the fix (a9542de, SESSION_FETCH_LIMIT = 200 with cursor paging); the checked-out branch does not. The fail-closed abort itself is correct behavior — the defect is the primary clone sitting on a stale branch, which silently converts every fire into a no-op.

Impact

Suggested remediation

  1. Confirm nobody owns the xaltha/12751-read-authority checkout in the primary clone (tree is clean except untracked .fleet-session-id; it looks like a left-behind checkout, not active work — but verify before touching), then restore the primary clone to main.
  2. Consider making the claimant independent of primary-clone branch state (pin the ref it runs from, or record the checked-out branch/commit in the fire log so the next incident names itself).

Notes

Activity

  1. developing-today commented on Nov 23, 2026

    @developing-today
    Contributor
  2. dezren39 commented on Nov 23, 2026

    @dezren39
    MemberAuthor

    Corroborating evidence from the builder's-advocate 21:00 CST census (session ses_e5df9a73927ffeBNRgZZK0szRP):

    • Fires 03:02:17Z and 03:06:18Z both exit cap_unknown with zero launches; queue broker healthy in both fire lines. The 21:00 conductor cycle (16/30 roots, complete census) dispatched 0, citing the only queued task as unverifiable — consistent with claimant blindness, not lack of work.
    • Shared clone /home/user/git/code is still on xaltha/12751-read-authority at 21:12 CST with one untracked file (.fleet-session-id); status otherwise clean. I did not switch it back (branch ownership unknown).

    Acceptance restated: a live fire from the primary clone returns numeric cap_room and launches or supervision-skips on task merits — no cap_unknown — with the clone on main.

  3. dezren39 commented on Nov 23, 2026

    @dezren39
    MemberAuthor

    Corroborating data point from the 03:16:23Z scheduled fire (live mode, primary clone still on xaltha/12751-read-authority): same abort — cap_room null, candidates_seen [task 20708, handed_off, opencode lane, #3321], skips [{reason: cap_unknown}], zero launches. Queue broker healthy (queue_health row present). No branch switch or launch attempted; claimant lane only.

  4. dezren39 commented on Nov 23, 2026

    @dezren39
    MemberAuthor

    Claim — Lane IF (archer), 2026-11-23 ~00:38 CST. Taking the reconciliation slice of #12813: verify first-hand whether the primary clone is back on main, what the recent claimant fires actually show now (the failure mode may have shifted to the queue session-proxy outage), and whether remediation item 2 (claimant independence from primary-clone branch state / branch recorded in the fire log) is a landable code slice. No other live claim found on the issue.

  5. added a commit that references this issue on Nov 23, 2026
  6. dezren39 commented on Nov 23, 2026

    @dezren39
    MemberAuthor

    Lane IF reconciliation + slice landed for #12813 — 2026-11-23 ~01:05 CST.

    Incident premise: RESOLVED in fact. Verified first-hand on the laptop: both primary clones (~/git/code and ~/code) are on main, clean (behind origin/main by 2, no local changes). The stale xaltha/12751-read-authority checkout that caused this incident is gone, and main's poll.py carries the #12225 fix (SESSION_FETCH_LIMIT = 200).

    The failure mode has moved — cap_unknown is gone. Recent fires from ~/.local/state/opencode-claimant/fires.jsonl:

    So the claimant is currently blocked by the queue backend outage (session-proxy leg down since ~05:48Z, tracked separately), not by anything in this issue. No claimant code change can fix that leg from here.

    Remediation item 2 (partial) — LANDED: PR #13008 (merged, head 09bf5491c6f): every fires.jsonl entry now carries code_source — the primary clone's checked-out branch + commit, read fail-open by read_code_source() and threaded through log_fire(), mirroring the #10332 mode_source pattern. The next stale-branch incident names itself in the first fire that hits it. Verification: new TestCodeSourceFireLog 3/3; fire-log classes (Main/CapUnknown/GateUnknown/GateExit/SingleInstanceLock) + new class 10 ran OK; full test_claimant suite still running under heavy laptop load at merge time (its tests run real timeout behaviour; the touched fire-log surface is fully covered by the classes above).

    What remains on #12813: the other half of item 2 — pinning the ref the claimant runs from so clone branch state cannot affect it at all. That is a deployment-shape change (the claimant currently executes from the primary clone by design), so it is a named decision for the owning line rather than a lane slice. With the clone restored, the incident itself closed in fact, and provenance landed, the issue's remaining content is that one decision.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions