GeezerVison is showing github.com — fleet(queue): tasks can sit at status=queued with attempts=max_attempts, permanently unclaimable — health reports them as available work · Issue #2937 · developing-today/code
fleet(queue): tasks can sit at status=queued with attempts=max_attempts, permanently unclaimable — health reports them as available work #2937DescriptionProblem
repo-health-opencode-pilot has 6 tasks with status = 'queued' that no worker can ever claim. All six sit at attempts = max_attempts (2/2). agent.claim_repo_task selects with attempts < max_attempts (design §claim, queue-worker-pilot-design-2026-10-25.md), so these rows are permanently invisible to every claim.
repo-queue.py health reports them as work available (queued_count = 6), so the worker gate in the lane instruction (§2) passes and a worker launches, only to get {"task": null} from claim with no diagnosis. Observed 2026-10-31 03:45–03:52Z: gate saw 6 queued, claim --worker repo-worker-opencode returned no task, exit 0.
The state is a contradiction: queued means "waiting to be claimed" and the row is not claimable. Nothing surfaces it — no failed/blocked/needs_review status, and health has no unclaimable column.
Evidence (2026-10-31 03:49Z)
All six rows, queue repo-health-opencode-pilot, status = queued:
| task |
attempts |
claimed_at |
last stage |
PR |
| 3636 |
2/2 |
2026-10-29T23:25:35 |
verified |
#926 |
| 3730 |
2/2 |
2026-10-30T02:21:23 |
awaiting_ci |
#940 |
| 3772 |
2/2 |
2026-10-30T04:17:22 |
verified |
#944 |
| 3847 |
2/2 |
2026-10-30T09:12:22 |
targeted_tests_passed |
#958 |
| 3913 |
2/2 |
2026-10-30T19:45:51 |
pr_opened |
#1011 |
| 3943 |
2/2 |
2026-10-30T20:34:00 |
pr_opened |
#1013 |
These are not abandoned tasks. Every one has a checkpointed stage and an open PR with real work behind it:
- id(web): bold links flip spelling on every save — strong+link marks have no round-trip fixpoint #944 —
MERGEABLE, all 8 non-skipped checks green. Ready to merge.
- cold-store-reaper: live Google access token is cached in state.json, which the README calls '(no secrets)' and which is written without 0600 permissions #940 — all checks green but
CONFLICTING (branch needs a rebase onto current main).
- amd: declare the muse user (sops password hash) #926 —
MERGEABLE, 6 green, basic unit (linux + windows) red on a pre-existing service-lifecycle pty-handoff flake already documented in the task's own park_reason.
- mcpx: ResolvedScope plumbing + spawn cwd = resolved scope root #958, test(id-web): softbreak marked-span round-trip regression tests (#981) #1011, fix(id-web): preserve footnotes in markdown codec (#945) #1013 —
MERGEABLE/CLEAN, but no pull_request CI run was ever triggered on their head SHAs (only CodeRabbit reported; the only Actions runs on those branches are push-triggered workflow failures unrelated to the PR — main-broken, Daily Upstream Sync, docs-update, stats, review, models-snapshot).
So work that is essentially complete (one PR is merge-ready, two more need only CI pickup) is stranded behind a status flag.
Other queues are affected too, in smaller numbers — fleet-wide at the same moment: repo-health-code-pilot 3 rows, repo-health-openchamber-pilot 1 row. So this is a shared the-queue-tooling issue, not an opencode-lane-only one.
Why it happens
park does not consume an attempt (migration 0012), but a worker that ends its run without a terminal verb leaves the row claimed until the lease expires. The expiry path returns it to queued and increments attempts. At the cap, queued and attempts < max_attempts disagree and the row is stuck. Task #1130 documents the evaporation side of this (run-budget cutoffs); this issue is the state it produces, which nothing currently detects or repairs.
The lane instruction says raise the cap by hand when a task goes dead-in-queue (that is what happened to tasks 1149 and 1157 per #1130). That is operator memory, not a mechanism, and it depends on someone noticing — which health actively prevents by counting these rows as queued.
Proposal
Pick per-row — the right answer differs and I do not want to guess the policy:
- Make the contradiction unrepresentable. On lease expiry, if
attempts has reached max_attempts, park/fail the row with a reason class instead of returning it to queued. Terminal states should be terminal.
- Surface it. Add
unclaimable_queued_count (or similar) to repo_queue_health, and have repo-queue.py health print it — the gate should see "6 queued, 0 claimable" so it can exit quietly with a reason rather than launching a worker that cannot work.
- Repair the existing rows. The six here map to open PRs, so most want a cap raise plus a resume, not a cancel.
(2) is the cheap, immediately useful one and would have saved this launch.
Acceptance criteria
-
repo_queue_health distinguishes queued-claimable from queued-at-cap, and repo-queue.py health shows both.
- The claim path cannot leave a row in
queued with attempts >= max_attempts (or health flags it — whichever the design pick above chooses).
- The six opencode rows (3636, 3730, 3772, 3847, 3913, 3943) reach a real terminal state; the three openchamber/code rows are triaged in the same pass.
- A worker that gets
claim → null while health shows queued work gets a diagnostic naming why (attempt cap / worker filter / lease), not a silent empty result.
Found by the OpenChamber scheduled lane (repo-worker-opencode) on its 2026-10-31 launch. Related: #1130 (evaporation cause), #1233 (queue reliability epic), #1289 (repo-queue list/inspect), #2323 (the other way a queued row becomes unreachable). Activitydeveloping-today commented on 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 7373 (triage, queued, priority 50) 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 commented on Nov 11, 2026
state: triaged
task: 14479
lane: any-b
worker: repo-worker-code
Task 14479 completes as triaged, on the strength of the existing verification already on this issue: lane code-m's 2026-11-10 agent note (verified at main 9d7f54f) established acceptance 1 DONE (#6528 at_cap_queued in health), acceptance 2 satisfied via the health-flag pick plus the #6838 revive path, and acceptance 3 superseded (the six original rows belonged to the retired Postgres backend). Re-verified fresh this claim: this shift's own fleet queue health output shows the at_cap_queued column live (repo-health-code-pilot: 4 at-cap of 30 queued), and the one remaining gap — acceptance 4, the claim-null diagnostic — is filed and queued as follow-on issue #8154 (carries queue/queued). Issue #2937 stays open for acceptance 4 via #8154. In-flight labels from this claim are cleared. dezren39 commented on Nov 17, 2026 🤖 Agent note · triaged — acceptance 4 still open, tracked by #8154
dezren39 commented on Nov 17, 2026 🤖 Agent note · done (triaged)
- Agent: queue worker (repo-worker-code), Muse lane any-i
- Session / ID: task 19789 (broker follow-on of triage task 18244)
- Found via: queue claim
- Task: Follow-on packet for issue fleet(queue): tasks can sit at status=queued with attempts=max_attempts, permanently unclaimable — health reports them as available work #2937 (queued tasks at attempts cap, permanently unclaimable) — completes as
triaged: the triage of record stands and the one remaining item is already routed.
- Fresh verification (2026-11-17, this lane): issue fleet(queue): tasks can sit at status=queued with attempts=max_attempts, permanently unclaimable — health reports them as available work #2937 OPEN, no held / user/owned / do-not-merge / do-not-auto-edit labels. Triage task 18244 (note 6936369243) confirmed acceptances 1–3 verified in the earlier triages (task 14479's record:
at_cap_queued live in health, fleet-queue (turso): no revive/requeue verb — dead-at-cap tasks can only be reset via direct SQL; enqueue dedupe ignores status #6838 revive path, the six original rows retired with the Postgres backend) and acceptance 4 — the claim-null diagnostic — tracked by OPEN issue fleet(queue): claim that finds nothing names why - surface at-cap / not-due counts in the no-claim diagnostic (follow-on #2937 acceptance 4) #8154, which carries its own queue routing. No duplicate packet is created from this follow-on; fleet(queue): tasks can sit at status=queued with attempts=max_attempts, permanently unclaimable — health reports them as available work #2937 stays open on fleet(queue): claim that finds nothing names why - surface at-cap / not-due counts in the no-claim diagnostic (follow-on #2937 acceptance 4) #8154.
dezren39 commented on Nov 23, 2026
Observed again on the OpenChamber scheduled lane (oc-code-01, 2026-11-23T02:15Z), in a new shape:
repo-queue health still passes the worker gate while every claim returns empty. Live sequence from this launch:
repo-queue health → stream code: 1 queued, oldest 2026-11-16T05:26:46Z (that row is task 17413, "Design mill: resume Fleet CA v0.3 from preserved draft (Fleet CA, credentials & secrets — v0.3 design mill (Summit build-out) #9155)", queued 6d20h, verified via list --queue code --status queued).
claim --filter 'repo = code', claim --filter 'queue = code', claim --filter 'repo=code' (spacing ruled out), and a fully unscoped claim — all four return {"task": null} with 0 queued (0 at the attempt cap, 0 not yet due), 0 parked due.
- Task 10984 (code-pilot,
parked → due) was claimable and worked normally in the same launch, so the lane's tooling and connectivity are fine.
So the gate/claim contradiction is back, and the #8154 diagnostic does NOT name the cause this time: it reports 0 queued at the attempt cap and 0 not-yet-due while a queued row visibly exists in stream code. Whatever excludes task 17413 from the claim pick (attempt cap on the row not reflected in the scoped counts, a stale count cache in the no-claim envelope, or a requires mismatch that the counts silently drop) is invisible to both health and the diagnostic. From the worker side the row is unreachable and unexplained — exactly the "permanently invisible to every claim" failure this issue describes.
Side observation from the same launch: right after a park --delay-seconds 1200, claims against the same row's stream still reported 0 parked due until ~02:34Z (the park's until), so the no-claim envelope's parked_due appears to be a point-in-time snapshot, not a live count — worth checking together with the 17413 counts since a shared stale-count source would explain both.
Not chasing the broker internals from this lane (out of scope for a scheduled shift); recording the evidence here per the queue protocol. The lane ended quietly: no claimable work in repo = code scope, one code-pilot task parked on its open design gate (#5679 → #5850) with the resume condition checkpointed. dezren39 commented on Nov 23, 2026
Update from the #12901 follow-up (2026-11-23, Lane IC): the attempt-cap reconciliation this issue's follow-up asked for is complete — full evidence record on #12901. Headlines: the enforced cap and creation default are now uniformly 1000 (#8973/#9609; the old per-kind defaults and the double-to-24 repair practice are superseded); at-cap rows are excluded from claim, reported separately in health (at_cap_queued, live: 0), fail terminally with an event instead of zombie-ing, and recover through revive; the published schema's stale max-10 cap was fixed in PR #12996. Historical totals: the ledger's 69 cap-doubled code tasks stand as recorded; the packet's 358 / 104→0 totals are unsubstantiated and marked unknown. One remainder: the live DB's column default is still 4 (inert — broker paths write 1000 explicitly), tracked in #12997; #12901 stays open on that alone. dezren39 commented on Nov 23, 2026
Claim — Lane JA (archer), 2026-11-23. Taking the reconciliation/close slice of #2937: fresh verification of all four acceptances against current main + the live store, including the 2026-11-23T02:18Z new-shape observation (task 17413 queued 6d20h while claims returned empty). If the observation is a distinct defect it gets its own issue; this lane does not manufacture a fix beyond the evidence.
Premise + ownership (fresh gh REST): #2937 OPEN, no live claim (last notes: oc-code-01 observation 02:18Z, Lane IC cross-update 06:42Z — neither a claim on this slice). #8154 (acceptance 4) reads CLOSED via PR #11232. dezren39 commented on Nov 23, 2026
Done — Lane JA (archer), 2026-11-23. Closing #2937 as completed: all four acceptances verified fresh against current main + the live store, and the 2026-11-23T02:18Z new-shape observation is explained — not a defect.
Acceptance verification:
- Health distinguishes queued-claimable from queued-at-cap ✅ —
at_cap_queued is computed in the broker health path on current main (pkgs/fleet/crates/fleet-queue/src/turso_queue/admin.rs, lifecycle.rs; repo queue: openchamber pilot tasks burn max_attempts on unlaunched handoffs and become silently unclaimable #6528). Live read this pass: 0 queued rows at cap in any queue.
- No silent queued-at-cap state ✅ — the design pick was the health flag (acceptance's own "or" branch): at-cap rows are excluded by the claim predicate (
attempts < max_attempts) and surfaced separately in health instead of being counted as available work. (The terminal-fail side — lease expiry at cap failing with a lease_expired_at_cap event, Queue semantics: lease expiry strands tasks at attempt cap in 'queued' forever (142 silent zombies in code queue) #6463 — is recorded in Lane IC's Fleet queue: reconcile attempt-cap defaults and dead-in-queue recovery #12901 reconciliation.)
- The six opencode rows reach a real terminal state ✅ — read live from the production store this pass: tasks 3636, 3730, 3772, 3847, 3913, 3943 are all
done (attempts 3–4, max_attempts 1000). Stronger than the earlier triage note, which had marked this superseded on the retired-Postgres reasoning; the rows exist in the live store and are terminal.
- Claim-null diagnostic names why ✅ — fleet(queue): claim that finds nothing names why - surface at-cap / not-due counts in the no-claim diagnostic (follow-on #2937 acceptance 4) #8154 (this acceptance's follow-on) is CLOSED via PR fleet(queue): no-claim diagnostic names why — at-cap / not-due counts (#8154) #11232: the broker attaches per-queue counts to the no-row claim envelope and the client prints them;
at_cap_queued / queued_not_yet_due are present in client.rs on current main.
The 02:18Z observation (task 17413), explained from the live row: task 17413 (code queue, "Design mill: resume Fleet CA v0.3", queued 2026-11-16) is lane-reserved to oc-code-07 (lane_id = oc-code-07) and carried a time ready-condition ({"kind":"time","until":"2026-11-21T09:00:34Z"}) that expired 2026-11-21T09:00:34Z. It is not at cap (attempts 4 / max 1000) and not not-yet-due (not_before NULL). The observing lane was oc-code-01, which correctly cannot claim another lane's reserved task — health counts queued work globally, a claim answers for one lane. That is the designed behavior, and the acceptance-4 diagnostic is exactly the surface that names it. The row has been claimable by its named lane since the time gate expired; no repair is owed by this issue.
No code change in this slice — the mechanisms all landed under #6528 / #6463 / #8154; this pass supplied the missing fresh close-out verification. Queue completion via the broker is unavailable (session-proxy leg down); disposition rests on this record.
MetadataMetadataDevelopmentNo branches or pull requestsIssue actions
|