Repository navigation
Skip Passes and end exhausted factory Commands as Paused Commands without agent-failed - #2207
Merged
Merged
Conversation
Scheduled Passes skip before any GitHub work when every route they may take is held by machine-local Plan usage, logging each reason once and showing a banner on the Inbox and in status. A live factory Command whose routes are all held ends as a Paused Command (exit 75), recording the stopping limit and Continuation, releasing its Claim without agent-failed and putting ready-for-agent back for Pickup unless an untrusted edit or a Security fix says otherwise. A Spec run starts no queued Ticket once one pauses. Pauses Pickup retakes sit in Done and are not emailed under email.unless_merged. Closes #2184
…elpers A Review run records its pause, and a Run whose Base fix pauses pauses with it. Every Paused Command keeps a resume command, a Spec run paused by a Ticket records what holds the routes, and a named Custom process's run clears its last skip reason. Child Runs end as Ended::Paused, the pause wording, Limit construction and allowed routes each live in one place, the Run notification reads Pickup's retake from the Command record, and the Plan usage banner reads nothing in unit tests.
Only a Command no route could take exits 75; an Experiment or Scoring run paused at a plan-limit warning keeps exiting 1. A Spec run's notification still names Tickets whose child Runs paused for Plan usage. Runs stopped at a structured usage limit now end paused, as their tests now expect.
…rchitecture page Clippy's result_large_err rejected Failure::Rejected once it carried a Limit inline; the site test rejects a bare "Run" in hand-written prose.
# Conflicts: # src/plan_usage.rs
This was referenced Nov 14, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
When no route a Command may take has Plan usage left, thirdshift now pauses instead of failing:
agent-failed.A banner,
Plan usage: every configured route is unavailable, so scheduled Passes skip: …; earliest reset …, shows on1 Inboxand inthirdshift statuswhile every default route on the machine is held.Evidence
Execution evidence
These tests failed before their fixes during review, with the output shown, and pass now:
cargo test --test plan_usage_pause a_review_run_whose_only_route_stops_at_its_limit_is_recorded_pausedassertion left == right failed … left: String("failed") right: "paused"After:
test a_review_run_whose_only_route_stops_at_its_limit_is_recorded_paused ... okcargo test --test base_fix a_base_fix_that_stops_at_its_plan_usage_limit_pauses_the_runleft: Some(1) right: Some(75)After:
test result: ok. 17 passed; 0 failed(wholebase_fixsuite)cargo test --bin thirdshift plan_usage::tests::machine_exhaustion_reads_nothing_in_unit_tests(withHOME=/tmp/ts-home)test … FAILED(foundwasSome)After:
test … okNew and affected suites now pass:
cargo test --test plan_usage_pause:14 passed; 0 failed--test plan_usage_routing:11 passed--test pass_quota:7 passed--test out_of_disk:4 passed--test quota_wait:10 passed--test run_notification:47 passed--test grok_sessions:6 passed--test console a_pause_pickup_retakes_sits_in_done_beside_the_plan_usage_banner:oknpm test --prefix console:# pass 205 # fail 0The full suite was run with
cargo test --no-fail-fast. Its only remaining failures are sandbox tests (binsandbox::tests, and some tests intrial,scoring,experimentsandbug_origins). They fail withsandbox failed to start: socat is not on PATHon this host, and they also fail onorigin/issue-583.Updated expectations: a Run stopped by a structured usage limit now ends paused (exit 75, subject
: paused). This changed tests inrun_notification.rs,grok_sessions.rsandpickup_run.rs(#9 paused: …). An Eval plan-limit pause still exits 1.Visual evidence
1 Inboxuses the same fixture in Before and After:claudeis in cooldown.retaken_by_pickup: true.factory-host.Desktop 1440×900. Before, both pauses are in Needs you and there is no banner. After, the banner shows, #7 is in Done and #8 is in Needs you.
Mobile 390×844, showing the counts. Before: Needs you 2, Done 0. After: Needs you 1, Done 1.
Review
thirdshift-code-reviewwas run againstrefs/remotes/origin/issue-583. Standards raised 12 findings and Spec raised 6. All were addressed infcbe4489,bc1eb619and760f8ded, except the part listed below.Review coverage: both reviewers read every file changed in the reviewed commit
d5ed0102exceptsite/docs/index.html. That file is generated fromdocs/guide.md(npm run docs:check --prefix sitepasses), and the reviewers confirmed the exclusion.Changed files the review left unread, because they were added or first changed after the review pass:
src/child_run/execution_tests.rstests/base_fix.rs(the reviewer's own test, added as written)tests/grok_sessions.rstests/pickup_run.rstests/run_notification.rsGLOSSARY.mdandsrc/logs/activity.rswere read only as supporting files, before their fix-up edits.Unaddressed findings
Standards
None.
Spec
a_spec_run_whose_ticket_pauses_at_a_full_window_records_the_stopping_harnesspasses.plan_usage::latest_limit(src/plan_usage.rs) takes the most recent active cooldown on the machine.run_ending::PAUSED_EXIT, read inchild_run::Handle::ending). That is deliberately the one channel no agent can write (ADR 0031, "Only structured Harness wire-frame events … count … so an agent cannot forge a pause").limit.Security
None.
Security review outcome
No unaddressed introduced findings.
Merge Danger
Door: two-way
The new Command record field
retaken_by_pickupis optional, and older readers ignore it. Reverting the change restores failing Runs, with no data migration.Blast Radius: wide
~/.thirdshift/plan-usage.jsonbefore any GitHub work. A stale cooldown there skips Passes until its reset orthirdshift plan-usage --clear.pausedinstead of 1 withfailed. That changes scheduler exit codes, notification subjects, and Failure limit counting, which is the point.Closes #2184
Built with claude 2.1.322 · claude-opus-5-5 · high