Repository navigation
Description
This was generated by AI during a grill-with-docs session.
Problem Statement
The Day shift can't tell from GitHub what thirdshift is running. A Claim's in-progress stays on after its Run has ended. It stays when the Run's pull request is ready for review, and when the Run failed with work on origin, even next to agent-failed. A Spec run that ends waiting only on gated Tickets is reported as a Failed spec run, so it keeps in-progress, gets agent-failed, and counts toward the Failure limit though nothing is broken. A Custom process already takes in-progress off at ready for review, so the same ending leaves different labels depending on which Command ran. And a failure's Recovery reaches only the host's command log, the Run notification and the Console, never the issue. On 2026-10-23 the Day shift relabelled six stale issues by hand and stopped trusting the label (#1165).
Solution
in-progress means a live Run, on issues as it already does on pull requests (ADR 0029). It comes off whenever a Run ends, and the issue is left marked with how it ended:
- Ready for review, or a Self-merge held with its pull request ready: no label. The open pull request stands for the work.
- Failed with work on
origin, or a failed Security fix:agent-failedin place ofin-progress, for Ticket runs, Spec runs and Custom processes alike. The Day shift takes over by puttingready-for-agentback, takingagent-failedoff, or closing the issue. - A Spec run that is only waiting:
ready-for-agentback on its Spec, with noagent-failed, so Pickup continues it once a Ticket becomes startable. If an account that is not a Trusted account has edited the Spec since its last Trusted labelling, the Spec getsneeds-triageinstead.
Every agent-failed issue except a failed Security fix gets its Recovery as a generated comment, and a waiting Spec gets a comment naming each undone Ticket and what it waits on. The Sweep takes in-progress off any open issue that also carries agent-failed.
Decided in the #1165 grill (Rounds 1–3).
User Stories
- As the Day shift, I want
in-progresson an issue only while a Run is live on it, so that the issue list answers "what is running?" for every host. - As the Day shift, I want a Ticket run whose pull request is ready for review to take
in-progressoff and put nothing back, so that a waiting review doesn't look like live work. - As the Day shift, I want a Spec run whose Spec PR is ready for review to take
in-progressoff its Spec, so that Specs and Tickets read the same way. - As the Day shift, I want a Self-merge held by a policy, security or merge hold, with its pull request left ready, to take
in-progressoff as ready for review does, so that a held merge doesn't look live. - As the Day shift, I want a Custom process's Delivery to keep taking
in-progressoff at ready for review, so that every Command ends ready for review the same way. - As the Day shift, I want an issue whose Self-merge merged but whose closing failed to keep
in-progressuntil it is closed, so that the finish still owed stays visible. - As the Day shift, I want Pickup not to take an issue whose pull request is waiting for review, even with no label on it, so that removing
in-progressdoesn't restart finished work. - As the Day shift, I want a Failed ticket run with work on
originto swapin-progressforagent-failed, so that a failure looks different from live work. - As the Day shift, I want a Failed spec run, one with a failed or interrupted Ticket, to swap
in-progressforagent-failedon its Spec, so that a real failure still holds the Failure limit. - As the Day shift, I want a failed Custom process on an issue to swap
in-progressforagent-failedand count toward the Failure limit, so that all failures count alike (Failure limit: should a failed Custom process run label its issue agent-failed? #1583). - As the Day shift, I want a failed Security fix to swap
in-progressforagent-failedeven with nothing onorigin, so that it stays with me as it does today. - As the Day shift, I want a Run interrupted without a Stop to end like any other Failed run, so that interruption doesn't leave a stale
in-progress. - As the Day shift, I want to take over a failed issue by taking
agent-failedoff, so that one act ends the failure whatever kind of Command failed. - As the Day shift, I want putting
ready-for-agentback on a failed issue to clearagent-failedand let Pickup start a Continuation, so that a retry stays one label edit. - As the Day shift, I want closing a failed issue to clear
agent-failedthrough the Sweep, as today. - As an operator, I want Pickup never to clear
agent-failedmerely because the issue carries neitherin-progressnorneeds-triage, so that the Failure limit still brakes once failures no longer carryin-progress. - As an operator, I want a Pickup run's Sweep to take
in-progressoff any open issue that also carriesagent-failed, so that issues failed under the old rules match the new ones without hand edits. - As the Day shift, I want a Spec run whose undone Tickets are all Unready Tickets, or blocked only behind them, to put
ready-for-agentback on its Spec withoutagent-failed, so that a human gate doesn't count as a factory failure. - As the Day shift, I want a Spec run whose undone Tickets wait on other running work, or sit outside the Spec's repository, to end the same waiting way, so that waiting on anything that isn't a failure reads the same.
- As the Day shift, I want to clear a Ticket's gate and have Pickup continue its Spec on its own, without handing the Spec back as well, so that the work I owe is only on the Tickets.
- As the Day shift, I want a waiting Spec with no Startable Ticket to stay put under
ready-for-agent, as Pickup already passes over it, so that putting the label back doesn't make Pickup spin. - As a security-minded owner, I want thirdshift to put
ready-for-agentback on a waiting Spec only if no account that is not a Trusted account has edited its title or body since its last Trustedready-for-agentlabelling, and to label itneeds-triageotherwise, so that the factory's own relabelling never launders an untrusted edit. - As the Day shift, I want a Spec run with any failed or interrupted Ticket to end
agent-failedeven when other Tickets are only waiting, so that a mixed result keeps the failure brake. - As the Day shift reading GitHub, I want every
agent-failedissue to get a comment marked as generated, giving the cause, where the Run stopped, what was preserved, the machine, and how to retry, so that I can act on a failure from the issue alone. - As the owner of a public repository, I want that comment to leave out local paths and the continue command, so that host details stay off GitHub.
- As a security-minded owner, I want a failed Security fix to post no comment, so that a vulnerability's details stay in its private advisory.
- As the Day shift, I want a failure that releases its issue to
ready-for-agentto post no comment, so that a retry loop can't fill the issue with comments. - As the Day shift, I want a waiting Spec to get a generated comment naming each undone Ticket and what it waits on, so that "waiting for you" looks different from a failure on GitHub (Distinguish Spec runs waiting for the Day shift from failed Spec runs #585).
- As the Day shift, I want a Run that fails again on the same issue to post again, so that the issue keeps a history of its attempts.
- As a Continuation session, I want the previous failure's comment in the issue text I'm given, as it is written by a Trusted account, so that I start from a factual account of where the last Run stopped.
- As the Day shift, I want a Stop to keep leaving
needs-triage, and a bug that can't be reproduced to keep leavingneeds-info, so that those endings don't change. - As a reader of the docs, I want the guide and the site's hand-written pages to describe the new label meanings, so that they match what thirdshift does.
Implementation Decisions
- Claim ending. Ending a Claim becomes "the Run is no longer live". The ready-for-review and held-Self-merge endings take
in-progressoff and put nothing back, using the ending a Custom process's Delivery already uses. The failure ending with work onorigin, and a failed Security fix, swapin-progressforagent-failedin one label edit. Release, Stop, not-reproduced and merged-and-closed endings are unchanged. Ending still finishes after Command interruption, and a failed label edit is a warning that names the edit to make by hand. - Custom processes share the Claim ending, so they swap labels the same way. Failure limit: should a failed Custom process run label its issue agent-failed? #1583 is answered by keeping their
agent-failed. - Take-over rule. Pickup's check that clears
agent-failedfrom an open issue the Day shift has acted on loses its "neitherin-progressnorneeds-triage" clause.agent-failedcomes off whenready-for-agentis back, when the Day shift took it off (nothing to do), when the issue is closed (the Sweep), or when a new Claim is made (unchanged). - Sweep. It also takes
in-progressoff every open issue that carriesagent-failed, keeping other labels, as a warning-only step like the rest of the Sweep. - Waiting Spec run. The Spec run's ending tells "only waiting" apart from failed. It is only waiting when no Ticket failed or was interrupted, and every undone Ticket is an Unready Ticket, blocked by Unready Tickets or by work elsewhere, or outside the Spec's repository. A blocking cycle is a failure, not waiting: nothing will unblock it until someone reshapes the Tickets. A waiting Spec run takes
in-progressoff its Spec and putsready-for-agentback, with noagent-failed. Before doing so it applies the Trusted-account check used for Ready issues, from the Spec's lastready-for-agentlabelling by a Trusted account. If an untrusted edit came after it, the Spec getsneeds-triageinstead. Distinguish Spec runs waiting for the Day shift from failed Spec runs #585 keeps the run's outcome name, exit code and notification wording. This Spec settles only the labels and the comment. - Ready issue. A
ready-for-agentthat thirdshift puts back on a waiting Spec counts as a handback after the last Claim ended. - Recovery comment. When a Run ends
agent-failed, other than a failed Security fix, thirdshift posts one issue comment. It opens with the repository's AI-attribution line, then gives the cause, where the Run stopped, what was preserved (the Issue branch and pull request by name), the machine, and "putready-for-agentback to retry". It has no local paths and no continue command. A waiting Spec run posts one comment on its Spec naming each undone Ticket and why. A failed comment post is a warning, never a failure. - Glossary. Already updated on the grill branch: Claim, Failure limit, Ready issue, Recovery, Sweep. Triage runs (Unattended triage of existing needs-triage issues #1695) follow the same take-over rule. A failed Triage run's extra
ready-for-humanis Unattended triage of existing needs-triage issues #1695's concern.
Testing Decisions
- A good test drives a real
thirdshiftCommand against the fakeghand fake Harness, then asserts the label edits and issue comments that the fake recorded. It does not assert internal calls. - Seams (no new ones):
- the fake
ghintegration tests, as the main seam: ready for review in a Ticket run and a Spec run, a failed Ticket run, a failed Custom process, the Sweep and take-over in Pickup runs, a waiting Spec run, and the Recovery comment; - the in-memory
Outsidealready used for Claim ending, for the label-edit edge cases: a failed edit, interruption, and a held Self-merge; - the in-memory
Outsidealready used for Pickup's Failure-limit count, for the take-over and Sweep rules; - the Spec run's existing
Outside, for classifying waiting against failed endings.
- the fake
- Prior art: the
agent-failedtests from Spec Spec: keep working Ready issues - a Failure limit for pickup and a Command limit for Passes #1564 in the failed-run, Pickup-run, process and Stop integration tests; the Spec run's "Tickets not done" cause tests; and the Base CI report's issue-comment tests.
Out of Scope
- A failure with nothing on
originreleasing toready-for-agentwith no brake. Filed separately. - Distinguish Spec runs waiting for the Day shift from failed Spec runs #585's waiting outcome name, exit code, notification wording and mixed-result presentation.
- Naming the machine that holds a live Claim (Say which machine holds a Claim #833).
- A Run killed outright never ending its Claim (Recover an open issue left in-progress by a Run that was killed outright #710).
- Unattended triage of existing needs-triage issues #1695's Triage-run Claim, beyond following the same take-over rule.
- Clearing
in-progressfrom issues that were ready for review under the old rules: a standaloneready-for-humanissue, blocked by this Spec, done by hand after release.
Further Notes
- Closes in-progress stays on issues whose Run has ended, so the label doesn't show what is running #1165 when its Spec PR lands.
- ADR 0029 amends ADR 0026's take-over rule.
Activity
in-progressoff at ready for review, swapped foragent-failedon failure #1902ready-for-agentback on its Spec, notagent-failed#1903in-progressfrom issues waiting for review #1905JacobStephens2 commentedon Nov 10, 2026
Handed back to Pickup.
in-progressis off andready-for-agentis on, so the next thirdshift Pickup that is not skipped for the Command limit can continue this issue. Whereagent-failedis still present, that pass takes it off as the Day shift's acknowledgement.