Skip to content

Skip Passes and end exhausted factory Commands as Paused Commands without agent-failed #2184

Closed

Description

@JacobStephens2

Parent

#583

What to build

Skip scheduled Passes and end live factory Commands cleanly as Paused Commands (outcome = "paused") when every allowed route's Plan usage is unavailable, releasing Claims without branding issues agent-failed or burning pickup.failure_limit and routing Needs you and Run notifications according to whether Pickup will retake the work automatically.

Specifically:

  • Before starting a scheduled Pass (Pickup, Triage, Architect, Review, Fix, Security, or a Custom process Pass), check whether at least one route allowed for that Pass has available machine-local Plan usage. When every allowed route is unavailable, skip the Pass quietly without sleeping in-process, writing one Activity log line per Pass kind only when its skip reason changes (with named Custom processes comparing against their own last skip reason, matching Quota wait dedupe) and clearing that reason when a Pass runs normally.
  • Display a status banner on 1 Inbox in the Console and in thirdshift status when every configured default route on the machine has unavailable Plan usage so scheduled Passes are skipping, naming the exhausted routes and the earliest known reset time.
  • Broaden Paused Command (outcome = "paused") beyond out-of-disk stops so any live factory Command (Ticket run, Spec run, Architect run, Pickup run, Security run, Review run, Fix run, Triage run, or Custom process) whose allowed routes all have unavailable Plan usage ends immediately as Paused without sleeping in-process: preserve branch work, record the stopping Harness, Plan window, utilization, reset time and Continuation / resume command on the Command record, and in a Spec run stop starting queued sibling Tickets while active Tickets finish or salvage.
  • End an issue's Claim for a Paused Command without adding agent-failed (never counting toward pickup.failure_limit): remove in-progress and put ready-for-agent back when the Claim took it off, unless an account that is not a Trusted account edited the issue since its last Trusted ready-for-agent labelling (which leaves needs-triage, ADR 0030) or the Run is a Security fix (which swaps for agent-failed, ADR 0031). Trigger Plan-usage Paused Command stops and Claim restoration only on structured Harness wire-frame or official RPC Plan-usage facts—never on agent-writable assistant or tool prose (ADR 0030, ADR 0031).
  • Place a Paused Command whose Claim restored ready-for-agent in Done/history as Paused rather than Needs you, and save its Run notification on disk without emailing when only_unmerged is set, because Pickup retakes it automatically once a Plan window resets or max_utilization clears. Keep any Paused Command that Pickup will not retake automatically (Experiment, Scoring run, pull-request Fix or Review, Security fix, untrusted-edit needs-triage, or a hand-started Run that did not restore ready-for-agent) in Needs you as Paused and email its Run notification when configured.

Acceptance criteria

  • Scheduled Passes skip without sleeping when every allowed route's local Plan usage is unavailable, logging one Activity log entry per Pass kind (and per named Custom process) only when its reason changes, and surfacing a status banner on 1 Inbox and thirdshift status when every configured default route on the machine is unavailable.
  • Live factory Commands stop immediately with outcome = "paused" when every allowed route's Plan usage is unavailable, recording the stopping Harness, Plan window, utilization, reset time and Continuation / resume command on the Command record, preserving branch work, and halting queued sibling Tickets in a Spec run while active ones finish or salvage.
  • Ending a Claim on a Paused Command removes in-progress without adding agent-failed or counting toward pickup.failure_limit, restoring ready-for-agent when the Claim took it off except when an untrusted edit occurred since the last Trusted ready-for-agent labelling (leaving needs-triage) or on a Security fix (applying agent-failed), and never triggers from agent-writable prose.
  • A Paused Command whose Claim restored ready-for-agent appears in Done/history rather than Needs you and suppresses email under only_unmerged while still saving the Run notification, whereas Paused Commands that Pickup will not retake automatically appear in Needs you as Paused and send email when configured.
  • Integration tests cover Pass skips + Activity log dedupe, the 1 Inbox and thirdshift status banner, outcome = "paused" across Ticket runs, Spec runs (halting queued Tickets) and Custom processes, Claim release with untrusted-edit / Security-fix / structured-evidence guards, and Done vs Needs you + only_unmerged notification behavior.

Blocked by

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

    enhancementready-for-agent

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions