Repository navigation
Description
Summary
The opencode-claimant's 12-session cap is consumed almost entirely by sessions that
are not the work it is trying to launch, so the claimant starves: 44 eligible
unbound opencode-lane candidates existed at the 2026-11-03 10:10 CT fire and the
gate closed with cap_room: 0 for the third fire running (also 15:45Z and 16:03Z).
Measured at 2026-11-03T16:12-16:13Z, via GET /api/session/active + a per-id
GET /api/session/<id> (per-id reads because the list truncates, #4757):
| component | count | note |
|---|---|---|
| active root sessions | 14 | 0 children |
| scheduled lane runners from the 10:00 CT fire | 11 | titles Queue lane (scheduled) - code/opencode 2026-11-03 10:00 |
| bound task worker sessions | 1 | task 8067, genuinely running (50 msgs, last message 0.4 min before the check) |
| the claimant session itself | 1 | ses_e5e5dd34a9fffehVF6gEz57StG, this fire |
| unbound orphan session, idle ~18h | 1 | see below |
Cap is 12, so the fire was over by 2 and launched nothing.
Two concrete problems
-
The claimant counts itself against its own cap. Each fire is a root session,
so a fire with plenty of capacity still spends one slot on the gatekeeper. At
the margin that is the difference between launching and not. -
A live-looking zombie holds a slot indefinitely. Session
ses_e5e61b938bfffeywl78cVRVoec, titleQueue lane (scheduled) - opencode 2026-11-02 16:00, is in/api/session/active({"type": "running"}) with
nooutcomeand notime.idle, but its last message is
2026-11-02T22:18:51Z(~17.9 h idle). No task row carries its id in
progress.session_id(ledger query returns[]), i.e. it is not a bound
task session, so supervision correctly will not touch it and no worker owns
it. It simply occupies one of the 12 slots.
Secondary
poll.py reported live_root_sessions: 50 — exactly the GET /api/session
page size — so the fleet total is still truncated (#4757). cap_room itself is
computed from /api/session/active, which is unaffected, so the gate is not
wrong here; only the reported total is.
Asks
- Decide whether the claimant's own session (and scheduled lane-runner
sessions) should count against the 12-session cap, or whether the cap should
count launchable work instead. Same question applies to the opencode lane's
admission control (OpenChamber dispatch v1.1: admission control, hand-backs, stall nudges, harvesting, Workhorse-first routing #1187). - Give the fleet watchdog a disposition rule for sessions the server reports
runningwith no terminal marker and no activity for hours, that are bound to
no task row: cancel/close them so the slot returns. - Note for the parallel-run gate (Move opencode executions to laptop-side scheduled tasks — retire the Muse boot handoff #3026 slice 2): while 11 lane runners can be
in flight at once, the claimant's cap room is structurally near zero, so
slice 2 cannot be evaluated on launch counts alone.
Evidence
Fire log lines: ~/.local/state/opencode-claimant/fires.jsonl at
2026-11-03T16:12:52Z (fire) and its 16:13Z supplement (cap composition +
stall report). Read-only fire; nothing was claimed, bound, launched or mutated.
Acceptance criteria
- The claimant's session-cap accounting no longer counts the claimant's own fire session against the cap it enforces (or the cap is explicitly defined to include it and the starvation math is re-derived and documented).
- Sessions present in
/api/session/activewith no queue binding, no outcome, and no activity beyond a stated staleness threshold are reaped or explicitly owned, so a zombie cannot hold a cap slot indefinitely. - A claimant fire with eligible unbound candidates and real capacity launches work; the
cap_room: 0starvation measurement from 2026-11-03T16:12Z no longer reproduces under the same session mix.
Activity
developing-today commentedon Nov 3, 2026
agent-note:v1
state: reviewed (coverage loop-back)
Coverage pass 2026-11-03, loop-back review: this issue was re-reviewed (drift / overlap / already-handled / stale / blockers / ordering) so every open issue in the four repos is reviewed and in the system. Verdict: still live; in the system as task 8578 (triage, queued, priority 40) in repo-health-code-pilot. Labels audited and synced. If it is already handled at current main, its triage closes it with evidence; if oversized, the triage files the split; blockers belong on this issue.
Found via: coverage loop-back 2026-11-03
dezren39 commentedon Nov 3, 2026
Intake review
Fleet monitor intake (Duty 2), 2026-11-03. (Posted on a delayed retry: the original comment attempts were rejected by a GitHub secondary rate limit; the label/body enrichment itself landed during the run.)
29 remaining items
dezren39 commentedon Nov 14, 2026
Released to the queue under Drew's 2026-11-13 unblock-all order (main chat, 23:53 CT). Task(s) 8578 moved from blocked/parked to queued in the fleet unblock-all pass (worker
main-unblock-all-2026-11-13). Dependency gates still recorded on a task remain recorded — the dependency checker will re-block it if a gate is genuinely unmet.dezren39 commentedon Nov 14, 2026
Agent note — task 8578 blocked, escalated-to-user (lane any-b)
user/escalated. The triage evidence stands (comment 6624582551; poll.py on origin/main counts every active root toward the 12 cap with no claimant/session-binding exclusion; PR claimant: count only active root sessions toward the 12 cap (#3026 gate) #3262 merged only added active-root filtering). No Drew ruling has landed on the issue since the escalation.session-cap-5016(status: asked) asks exactly this: does the 12-session cap include scheduled lane runners, and what headroom is reserved for the claimant (options: cap includes runners with named headroom / cap excludes runners / different cap). No duplicate ledger entry was created; this block records that item id.session-cap-5016. On the ruling, implementation resumes per the recorded plan (implement + regression-test the chosen session mix, without duplicating opencode-claimant: cap and supervision read GET /api/session, which truncates at 50 — active roots undercounted, live bound sessions reported gone #4757 / opencode-claimant: requeue/lease expiry never clears a bound session_id — a live session can sit on a claimable task (7787), and a relaunch can never re-bind #5001). Labels synced:queue/blocked+status/blockedset, stalequeue/queuedremoved,user/escalatedretained. No code or session state was changed.dezren39 commentedon Nov 16, 2026
Agent note — task 8578 triaged: cap-semantics ruling RECORDED, escalation closed (lane any-c)
session-cap-5016was ANSWERED at 2026-11-16T02:00:33-06:00 via orchestrator-audit-2026-11-16 (fleet-decidable under Drew's 2026-11-12 cap doctrine — caps that bind work intake are unwanted). A decision already recorded is never re-asked, so this lane records the ruling here instead of re-escalating.user/escalatedremoved (the wait on Drew is over), queue/status blocked labels cleared at task completion, fix follow-on enqueued (dedupe-checked) and named in task 8578's completion result. Issue opencode-claimant: the 12-session cap is consumed by lane runners, the claimant itself and an 18h zombie session — so 44 eligible candidates never launch #5016 stays OPEN for the fix.dezren39 commentedon Nov 16, 2026
Conductor dispatch (2026-11-16 12:05Z): task 17428 claimed by worker
fleet-conductor, sessionses_e5e1bbe701affeocuJpkrCzqna, worktree~/git/fleet/17428-5016-claimant-cap, branchqueue/17428-5016-claimant-capoff origin/mainbb57b6f588. Implementing recorded rulingsession-cap-5016(cap counts claimant roots only; lane runners outside). Acceptance: claimant launches up to 12 claimant roots with runners active; zombies expire out of the count; existing claimant tests pass. Sibling note: task 17446 (#3418) is in-flight in the same pm-stack/opencode-claimant area; worker instructed to keep the diff to cap accounting + staleness handling.dezren39 commentedon Nov 16, 2026
🤖 Agent note · fix landed · ruling
session-cap-5016(#5016)fleet-conductor, branchqueue/17428-5016-claimant-cap) — sibling task 17446 (design(queue): budget-aware claiming — parks carry a minimum required time budget, claim matches the claimer's remaining shift budget #3418, budget-aware claiming) is untouched.Failing test I started from (
TestClaimantCapAccountinginpm-stack/opencode-claimant/test_poll.py, class at test_poll.py:124): the #5016 census oracle — 11 scheduled lane runners + the claimant's own fire session + 1 genuinely running bound work root + the ~18 h unbound zombie — must count 1, not 14. 5 of the 11 tests failed against the old accounting ((live, active, room)came back(3, 3, 33)for a lane-runner + worker mix; the 18 h zombie counted as active through the server's active set).Code path changed:
pm-stack/opencode-claimant/poll.py:414is_scheduled_session— oraclemetadata.openchamber.kind == "scheduled", stamped by OpenChamber on every scheduled task session (verified live 2026-11-16 across 366 roots);Queue lane (scheduled)/Opencode lane claimant/executortitle prefixes as the legacy fallback. Unknown metadata counts, never manufactures room (fail-closed).pm-stack/opencode-claimant/poll.py:439-446is_claimant_root_session+ staleness bound in_active_root_state— a server-active root whosetime.updatedhas not moved forACTIVE_SET_STALE_MS(= 2 h, poll.py:127) is a zombie and releases its slot.pm-stack/opencode-claimant/poll.py:501count_active_claimant_rootsfeedssummarize_cap(poll.py:512) andget_active_root_session_count(poll.py:841);claimant.py:303delegates to the same function so the two entry points cannot diverge.prompt.md/README.mdstate the cap as claimant roots only.Staleness bound (2 h) rationale: 4x the 30 min marker window (a resumed session keeps earlier-run markers) and 9x below the observed 18 h zombie; OpenCode refreshes
time.updatedon every step, so a live session's clock moves far faster. Releasing a slot only changes cap accounting — it never kills a session, so a false positive costs one slot, not lost work. Open question recorded with my default: whether the watchdog should also close zombie sessions (out of scope here) — default: no, accounting-only release is the safe half; termination is a separate watchdog decision.Test command + result:
cd pm-stack/opencode-claimant && python3 -I run_hermetic_tests.py→Ran 124 tests ... OK. Live read-only server check 2026-11-16: 22 active roots → only 4 claimant roots (oldcap_room14, newcap_room32).Branch/PR: PR #10733, merge-ready on review.
Merge pull request #10733 from developing-today/queue/17428-5016-clai…