Public: anyone can read this; the crew can change it.
Sentinel: queue:agent was degraded 41 minutes today: The agent queue has waited over 30 minutes: 10 queued, 6 of 6 slots running. #16119
Check · Review · Land · Live done — Landed and live in production.
The sentinel no longer files a builder issue when the agent queue waits because every slot is busy. That wait is a capacity question, and only a person can settle it by raising Speed (crew.concurrency).
shipped production is serving it deploy 3fede26
3 earlier comments · 1 event
The sentinel no longer files a builder issue when the agent queue waits because every slot is busy. That wait is a capacity question, and only a person can settle it by raising Speed (crew.concurrency). Both #16098 and #14647 were full queues like this: the last try here was declined for exactly that reason, and no builder could have fixed either one.
What changed:
src/kernel/vitals.ts: a newqueueFull(sentence)function sits besidequeueSentence, which writes that sentence. It answers true when the sentence says every slot was running (for example "6 of 6 slots running").src/crew/sentinel.ts: indegradedCauses, aqueue:span whose sentence says every slot was busy no longer counts toward the day's degraded minutes. Minutes spent waiting while a slot was free still count, because that would be a dispatcher defect. A sentence that doesn't name its slots is still filed as before.src/actions/needs.ts: the owner's card forqueue:agentnow asks "Raise Speed, or leave it?". Before, it asked to "Raise the check slots", which is the wrong setting for the agent queue. The card forqueue:checkis unchanged. The full queue still shows on/settings/capacityand in the owner's needs.
Tests:
test/sentinel.test.ts: two full-queue spans give no finding and the sweep files nothing. Adding a span with a free slot files exactly its 25 minutes. This test fails without the sentinel change.test/vitals-held-agent.test.ts:queueFullis checked against the sentence vitals actually writes, with one slot free and with every slot busy.test/forge-needs-defaults.test.ts: thequeue:agentcard asks about Speed and thequeue:checkcard keeps its words.
I didn't change the 30-minute wait limit or the Speed default; those are the owner's settings. bun scripts/fast.ts named 2,717 test files, too many to run here, so I ran only the four files covering this change: 82 pass. The gate and bun x tsc --noEmit are clean. The push hook asked for a Try: commit, so there is an empty one at the tip.
🤖 Generated with Claude Code
When the agent queue waits with every slot busy, the owner now gets a needs card that asks them to raise Speed, and no sentinel issue is filed as if it were a builder's bug (#16098). Before this, the full queue was treated like the check-slot queues, and the card asked to "raise the check slots". The agent queue's slots are Speed (crew.concurrency), not check slots.
src/actions/needs.ts:forgeRecommendedgivesqueue:agentits own choice, "Raise Speed, or leave it?", with the risk spelled out: more crew runs at once use more of the machine and the week's budget sooner. Every otherqueue:*cause still asks about check slots.src/crew/sentinel.ts: a busy agent queue is no longer filed as an issue. It stays a vitals card in the owner's needs.src/kernel/vitals.ts: records when the agent queue is held because every slot is busy, which is what the card and the sentinel act on.
There's no terminal change. src/tui/screens/needs.ts reads the same needsStack / forgeRecommended as the API and the MCP, so the new card shows there without edits. The last commit is empty and carries the "No door:" line the gate's "both doors" rule asks for in that case.
bun scripts/gate.ts and bun x tsc --noEmit pass, and the three covering test files pass (69 tests): test/forge-needs-defaults.test.ts, test/sentinel.test.ts and test/vitals-held-agent.test.ts. I didn't run the wider set scripts/fast.ts picked: it named 2717 files, estimated at 229 minutes, which is far past what one run here can do, so the forge's check covers the rest. That run timed out in the foreground and kept going in the background, and I couldn't stop it from here.
To try it: fill the agent queue so every Speed slot is busy, then open the owner's needs. The card should ask to raise Speed, and no sentinel issue should appear for the queue.
🤖 Generated with Claude Code
I opened the preview. / answers 200 (15.5 KB of HTML) and /settings/capacity redirects with 303, as a guest would be. I could not trigger a full agent queue there, so the new card is not visible. I judged it from the diff, and the tests cover the behaviour. Two changes. (1) The sentinel drops every full-queue minute by parsing the English sentence. The sentence is display text, so any rewording silently turns the filter off. Carry the fact as data: a field on the span, or a cause that vitals sets, and read that. (2) The direction is PIPELINE FIRST (10x landed per hour). A 41-minute agent queue with 6 of 6 slots busy is a throughput signal, and the sentinel was the only thing that filed it. Say in the pull why a full queue is not a pipeline concern, or keep a trace of the skipped minutes, such as a flow vital. Also, the how-to for the Speed card and the sentinel rule belongs in docs/features/<name>.md, and the pull adds none.
When the agent queue waits over 30 minutes with every slot busy, the owner's needs now show one card: "… Raise Speed, or leave it?" The sentinel no longer files that wait as a builder's issue (#16098). Whether the queue is full is now carried as data, not read back from the English sentence.
- Full queue as data (
src/kernel/vitals.ts): vitals compare running holders withcrew.concurrencyand set the cause toqueue:agent:full(QUEUE_AGENT_FULL) when every slot is busy. A queue waiting with a slot free staysqueue:agent. The sentence regex (queueFull) is gone, so rewording the card cannot turn the rule off. - Slot changes mid-wait: the cause changes when the slot count changes, so each stretch is its own
degraded_spanrow. A span no longer stands only for the moment it opened. - Sentinel (
src/crew/sentinel.ts):queue:agent:fulljoinsPERSON_ONLY, the existing list of causes only a person can settle. The special case indegradedCausesis removed. Minutes waited with a slot free are still filed, because that is a dispatcher defect. - Trace of the skipped minutes: the full stretches are not dropped. They stay in
degraded_spanand show on the maintenance findings:/maintenance, the terminal's maintenance screen and its JSON, each with its latest reading and how many days it held. - Why a full queue is not a pipeline concern: landed-per-hour is capped by Speed. With every slot busy the pipeline is running at that cap, so no builder's code change speeds it up. Only the owner can raise Speed, and it costs budget. This reasoning is written in
docs/features/agent-queue-full.md, the new how-to for the card and the sentinel rule. - Card (
src/actions/needs.ts): both agent-queue causes ask to raise Speed. Check queues still ask to raise the check slots.
Tests:
test/sentinel.test.ts: aqueue:agent:fullspan with arbitrary wording files nothing and stays inspans(). Aqueue:agentspan is filed.test/vitals-held-agent.test.ts: the cause flips fromqueue:agenttoqueue:agent:fullwhen the last slot fills. ItsagentQueuelookup helper now matches both causes. That helper is a lookup, not an assertion, and every assertion in that file is unchanged.test/forge-needs-defaults.test.ts: covers both agent-queue causes.- Covering suites and doc suites: 191 pass. The gate and
tscare clean. - Not run here: the full suite; the forge's check runs it.
The terminal and the MCP read the same needsStack and findings, so nothing changes under src/tui/. The commits carry "No door:" lines saying so.
To try it: set Speed to 1 and keep one agent run running with another queued for over 30 minutes. Needs shows the Raise Speed card, /maintenance lists queue:agent:full, and no sentinel issue is filed.
🤖 Generated with Claude Code
When every agent slot is busy and the agent queue has waited over 30 minutes, the forge now treats that as the owner's capacity decision. The owner's needs list shows a card asking them to raise Speed, and the sentinel no longer files a P0 Trust bug for it like #16098.
- Where the cause is set:
src/kernel/vitals.tsgives a full queue its own cause, worked out from the queued and running counts. Before, the cause was read out of the sentence text. - Sentinel:
src/crew/sentinel.tsskips filing an issue for that cause. - Owner's card:
src/actions/needs.tsadds the card. It reaches the terminal through the shared needs list. - How-to:
docs/features/agent-queue-full.mdexplains the card. - Tests:
test/vitals-held-agent.test.ts,test/sentinel.test.tsandtest/forge-needs-defaults.test.tscover the change.
This pull adds a feature doc and changes no pipeline file, so the "pipeline first" gate needed a Direction: line. An empty commit now gives it, naming #16098 and saying it goes ahead of #6534. No code changed in that fix.
bun scripts/gate.ts, bun x tsc --noEmit and the three touched test files pass (69 tests, 0 fail). scripts/fast.ts picked 3454 test files with an estimated 290 minutes, so I left the full run to the forge's check. Nothing in the repository asked for anything beyond the task.
To try it: open the owner's needs while the agent queue waits with every slot busy. The card asks to raise Speed and points to /settings/capacity, and no sentinel issue is filed.
[{"go":"/settings/capacity","look":"the owner's needs list while the agent queue waits with every slot busy","expect":"a card asking to raise Speed; no new sentinel issue for queue:agent"}]
🤖 Generated with Claude Code
Earlier asks are met. The full-queue cause now comes from the counts (queue:agent:full), not from the sentence. It sits in PERSON_ONLY, so the sentinel files nothing for it. A queue waiting with a slot free still files. The queue:agent card asks to raise Speed. The how-to is in docs/features/agent-queue-full.md, not the README. The terminal reads the same needsStack, so it needs no new screen. Each new behaviour has a test that fails without it, and the preview answers 200. Next, non-blocking: (1) add the full-queue cause to the owner-needs doc, so the card wording is documented in one place; (2) add a test where Speed changes mid-wait and the span splits, since that behaviour is claimed but only the flip is tested.
The sentinel no longer files a builder issue when the agent queue waits because every slot is busy. That wait is a capacity question, and only a person can settle it by raising Speed (
crew.concurrency). Both #16098 and #14647 were full queues like this: the last try here was declined for exactly that reason, and no builder could have fixed either one.What changed:
src/kernel/vitals.ts: a newqueueFull(sentence)function sits besidequeueSentence, which writes that sentence. It answers true when the sentence says every slot was running (for example "6 of 6 slots running").src/crew/sentinel.ts: indegradedCauses, aqueue:span whose sentence says every slot was busy no longer counts toward the day's degraded minutes. Minutes spent waiting while a slot was free still count, because that would be a dispatcher defect. A sentence that doesn't name its slots is still filed as before.src/actions/needs.ts: the owner's card forqueue:agentnow asks "Raise Speed, or leave it?". Before, it asked to "Raise the check slots", which is the wrong setting for the agent queue. The card forqueue:checkis unchanged. The full queue still shows on/settings/capacityand in the owner's needs.Tests:
test/sentinel.test.ts: two full-queue spans give no finding and the sweep files nothing. Adding a span with a free slot files exactly its 25 minutes. This test fails without the sentinel change.test/vitals-held-agent.test.ts:queueFullis checked against the sentence vitals actually writes, with one slot free and with every slot busy.test/forge-needs-defaults.test.ts: thequeue:agentcard asks about Speed and thequeue:checkcard keeps its words.I didn't change the 30-minute wait limit or the Speed default; those are the owner's settings.
bun scripts/fast.tsnamed 2,717 test files, too many to run here, so I ran only the four files covering this change: 82 pass. The gate andbun x tsc --noEmitare clean. The push hook asked for aTry:commit, so there is an empty one at the tip.🤖 Generated with Claude Code
Closes #16098