Skip to content

Pickup runs continue a ready-for-agent issue the Day shift handed back after a failed Run #617

Closed

Description

@JacobStephens2

Problem

A Pickup run never takes an issue that the Day shift handed back to the factory after a failed Run. The Ready issue rule in CONTEXT.md requires "never started (no Issue branch and no pull request)", so standing_of in src/ready.rs passes over such an issue with Reason::Started on every pass, even though a human relabelled it ready-for-agent on purpose.

Three issues are stuck this way right now. All three were taken by Pickup runs around 02:33 UTC on 2026-10-10, interrupted around 03:21 UTC, and relabelled in-progress -> ready-for-agent by me around 03:26 UTC:

Issue What shows it was started
#189 slim down thirdshift help issue-189 on origin at 655e782 (0d162e1 Slim down thirdshift help (#189) + thirdshift: failed run (interrupted)), no PR
#606 email notice names every model in the run issue-606 on origin at 018a82d (adfbd72, 0147b57 + thirdshift: failed run (interrupted)), no PR
#607 Security review surfaces the session's reason for ending incomplete issue-607 on origin at 4b13cb9 (31f8b5b, dc75087 + thirdshift: failed run (interrupted)), open draft PR #612

Each is open, labelled ready-for-agent, has no Claim, no parent, no sub-issues and no open blocker. The only rule keeping them out of the queue is the started rule.

Why the rule is wrong here

The Claim already covers the case the started rule protects against. A Run that ends with work on origin keeps its in-progress Claim "until the Day shift relabels it" (CONTEXT.md, Claim). So an issue with an Issue branch only comes back as ready-for-agent when a human put it there. That relabel is the signal to carry on.

Carrying on is already defined. ADR 0002 (docs/adr/0002-existing-issue-branch-means-continue.md) says a Run on an issue whose issue-<n> has no PR or an open PR checks it out and continues, and one whose PR is merged or closed starts issue-<n>-branch-2. A Run started on the Issue URL by hand does exactly this today. The Pickup run, which "starts a Spec run or a Run on it, as the command on that issue's URL would", refuses the same issue.

Today the only ways to get these three moving are deleting the branch (throwing away the interrupted work) or launching each Run by hand.

What to change

  • A ready-for-agent issue that was started is a Ready issue when it was labelled ready-for-agent after its last Claim ended, so the Day shift's relabel is what lets it back in. The Pickup run dispatches it as a Continuation per ADR 0002.
  • An issue that is started and was never claimed (e.g. someone pushed issue-<n> by hand and labelled it) stays passed over, so a Pickup run never takes over work a human is doing outside the factory. If that distinction can't be read reliably from the timeline, say so in the PR and pick the simpler rule.
  • The settling window still applies, measured from the relabel, as it does now.
  • Update the Ready issue definition in CONTEXT.md, the standing_of doc comment, and the passed-over line (#<n> started: ...) so a skipped started issue says why it still is not eligible.
  • Tests in src/ready.rs: an issue relabelled after an interrupted Run with a branch and no PR is a Ready issue; one with an open PR is a Ready issue; a started issue that was never claimed is passed over.

Done when

With this merged, the next Pickup run on this repository takes #189 (the lowest-numbered of the three) and continues on issue-189 rather than passing over it.

Activity

  1. added
    enhancement
    needs-triage
    on Oct 10, 2026
  2. JacobStephens2 commented on Oct 17, 2026

    @JacobStephens2
    OwnerAuthor

    This was generated by AI during triage.

    Agent Brief

    Category: enhancement
    Summary: Let Pickup continue started work only after an explicit ready-for-agent hand-back following its last Claim.

    Current behavior:
    Pickup unconditionally passes over any started issue, even after the Day shift removes its Claim and deliberately applies ready-for-agent. Directly running the same Issue URL already follows the Continuation contract. The original issue's #189/#606/#607 examples are historical and are not current end-to-end acceptance targets.

    Desired behavior:
    Add the requested narrow exception to the Ready issue rule: a started issue can be selected when current labels permit agent work and trustworthy issue history establishes the last Claim, that Claim ending, and a later ready-for-agent application handing the work back. Continue existing Issue branches/open PRs through the same dispatcher and ADR 0002 behavior as an explicit Issue URL.

    Keep every other readiness gate and the settling window. A started issue that was never Claimed, or one lacking a later hand-back, is normally passed over with an explanatory reason. Follow the original issue’s express fallback: if the distinction between never-Claimed human work and a prior factory Claim cannot be read reliably from the available timeline, document that limitation in the PR and choose the simpler rule, stating and testing its exact eligibility behavior and trade-off. Avoid treating a merely truncated first page as proof of missing history. This issue authorizes deliberate hand-back, not automatic failure retries. Security fix exclusions remain in force.

    Key interfaces:

    • GitHub candidate/history read: expose enough trustworthy label chronology to establish the exception, including pagination/completeness where needed.
    • Ready issue standing and passed-over diagnostics: distinguish eligible hand-back from other started work.
    • Pickup dispatch/Continuation: reuse existing branch/PR selection and preservation.
    • Domain and user-facing Ready issue/Architect recovery documentation: describe the narrow deliberate hand-back exception consistently.

    Acceptance criteria:

    • Prior Claim followed by its removal and a later ready-for-agent application admits a started issue with a preserved branch and no PR.
    • The same ordered hand-back admits an issue with an open PR and uses the existing Continuation path.
    • Eligibility uses the last Claim and its ending, rather than an older Claim. Missing/out-of-order hand-back events and an active Claim remain ineligible. Never-Claimed started work stays skipped under the preferred history-based rule; if the explicitly authorized simpler-rule fallback is necessary, the PR explains why and tests that chosen rule.
    • Existing Unready-label, parent, blocker, Security-fix and settling gates still apply; recent hand-back waits for the configured settling period.
    • Focused GitHub-read/readiness/dispatch regression cases exercise the event ordering and branch/open-PR outcomes without relying on the historical issues staying open.
    • Documentation and skipped-started diagnostics explain the new exception without promising unconditional retries.

    Out of scope:
    Automatic Claim release, crash recovery (#710), service retries (#584), broadening beyond the original issue’s explicit fallback, weakening the cross-machine Claim coordination contract, or deleting branches to force a fresh Run.

  3. added
    ready-for-agent
    in-progress
    and removed
    needs-triage
    ready-for-agent
    on Oct 17, 2026
  4. removed
    in-progress
    on Oct 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions