Repository navigation
acpmux: recover turns after limits and gateway outages - #27924
Conversation
|
Found 3 test failures on Blacksmith runners: Failures
|
|
cmux status (one comment, edited in place; each line is updated by the job that owns it) Review App of this head (app.zip, kept 1 day)
web and size checks: green Shipped in:
|
Resolve retry_turn against base's automatic first-send resend (auto: Option<&str>), keeping restored manual retries (no Stop override, no new manual marker) and recording manual_refused only for non-automatic retries. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-2dcca989fa7ce7778b47
Bugbot needs on-demand usage enabledBugbot uses usage-based billing for this team and requires on-demand usage to be enabled. A team admin can enable on-demand usage in the Cursor dashboard. |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-2dcca989fa7ce7778b47
…own in handoff tests The base handoff tests model a restart, which now takes shutdown_all_with_auto_resume(true); an explicit shutdown settles retries. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-2dcca989fa7ce7778b47
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-2dcca989fa7ce7778b47
Bugbot needs on-demand usage enabledBugbot uses usage-based billing for this team and requires on-demand usage to be enabled. A team admin can enable on-demand usage in the Cursor dashboard. |
|
Review (codex gpt-6-astra high, router-review): SHIP at 5438df8 Range 8dd8bdc..5438df8 (merge-base...head, after merging feat-cmux-next).
|
…ests fail over on sign-in A turn an explicit shutdown cuts is still the next daemon's to continue (restart_resume), as base's restart tests expect. The stop-during-failover tests now trigger failover with a sign-in failure, since a usage limit waits for its reset. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-2dcca989fa7ce7778b47
…stored manual retry honours Stop Router review (gpt-6.1-sol xhigh) at 5c857a1: finish_auto_resume read the shutdown plan under the retry lock (reverse of before_shutdown/set_retry); a retry firing during a restart's drain was refused at start and its shutdown failure superseded the saved schedule; a Stop before a restored manual retry claimed the turn did not cancel it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-2dcca989fa7ce7778b47
Bugbot needs on-demand usage enabledBugbot uses usage-based billing for this team and requires on-demand usage to be enabled. A team admin can enable on-demand usage in the Cursor dashboard. |
|
Review (codex gpt-6.1-sol xhigh, router-review): BLOCK at 5c857a1
Addressed in f63a239: #1 (shutdown plan read before the retry lock), #2 (no retry dispatch once any shutdown began; the durable wait stays for the next daemon), #3 (a restored manual retry refuses once a Stop cleared its wait). #4 filed as a follow-up. |
|
Review (codex gpt-6-astra high, delta 5c857a1..f63a239): SHIP at f63a239 Delta review of the round-2 fixes against the gpt-6.1-sol BLOCK at 5c857a1:
No new delta-introduced blocking defect was found. Follow-ups: none new. Tests at f63a239: acpmux lib 2596/2597 (exe_still_names_a_program_whose_file_was_replaced is a known flake that passes alone; filed in our tracker), hub_integration 633/633. cmux-next-ios/rust is a base red (this PR changes nothing in cmux-next-ios). |
|
Review carry: SHIP at 70db182 70db182 is cmux-bot's clean base merge of f63a239 (SHIP, codex gpt-6-astra high, delta review: #27924 (comment)). The PR's diff against its merge base has the same patch-id at both heads. Remaining red: cmux-next-ios/rust (base red; no cmux-next-ios change here). |
|
Review (the owner lane's independent review, at its land request): SHIP at 70db182 Recorded by lane-gh-broker from this PR's owner lane, which asked to land this exact head after its independent review. next-autoland lands it once every red is the base's; a BLOCK at this head, a HOLD line or a hold label still stops it. |
…ble_match) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-2dcca989fa7ce7778b47
|
Review (codex gpt-6-astra high, delta 70db182..093ebe3): SHIP at 093ebe3 Lint-only delta (clippy collapsible_match in restore.rs; the collapsed arm falls through to the catch-all, behavior unchanged) on top of the SHIP at f63a239 / its clean base-merge carry at 70db182. clippy -p acpmux --all-targets -D warnings clean; restore tests 28/28. |
Bugbot needs on-demand usage enabledBugbot uses usage-based billing for this team and requires on-demand usage to be enabled. A team admin can enable on-demand usage in the Cursor dashboard. |
|
Review carry: SHIP at 916b9c3 916b9c3 is cmux-bot's clean base merge of 093ebe3 (SHIP: #27924 (comment)). Same patch-id against the merge base at both heads. |
|
Review (the owner lane's independent review, at its land request): SHIP at 916b9c3 Recorded by lane-gh-broker from this PR's owner lane, which asked to land this exact head after its independent review. next-autoland lands it once every red is the base's; a BLOCK at this head, a HOLD line or a hold label still stops it. |
…g indexes The panic ratchet counted 20 indexing_slicing and 12 string_slice hits in reset_hint.rs and restore.rs; they now use get/split_at_checked/slice patterns. Also reads 'Retry-After: 500 milliseconds' as 500 ms, not 30 minutes (review follow-up). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-2dcca989fa7ce7778b47
Bugbot needs on-demand usage enabledBugbot uses usage-based billing for this team and requires on-demand usage to be enabled. A team admin can enable on-demand usage in the Cursor dashboard. |
|
Review (codex gpt-6-astra high, delta 916b9c3..d2b2b3b): SHIP at d2b2b3b Panic-ratchet fix: the 20 indexing_slicing and 12 string_slice hits this PR added (reset_hint.rs, restore.rs) now use get/split_at_checked/slice patterns; "Retry-After: 500 milliseconds" reads as 500 ms (closes that review follow-up). Reviewer: behavior-preserving, no findings. rust_panic_ratchet.py -p acpmux: not red; clippy -p acpmux --all-targets -D warnings clean; reset_hint/restore/auto_resume lib tests 70/70. |
![Fix with [code]smith](https://pr-comments-assets.blacksmith.sh/codesmith/fix-with-codesmith-light-3x.png)
This PR makes acpmux recover failed turns in place instead of stranding sessions after account limits or gateway outages. It uses the existing RunSpec admission and account cooldown path; it does not add a second scheduler or revive by switching accounts.
Leo, verbatim (2026-10-29): "ok uh in addition i was asking you guys about that so you could help analyze my usage and how to make us both more effective and efficient".
Leo also said: "hmm what's going on with these? they get lost under network breaks and dont do anything?" and "also let's not do this anymore" about lane-revive switching accounts.
The implementation resumes the same session after Claude session/weekly limits, router capacity, HTTP 429/502/503/529, and
harness_unavailable; honors Retry-After seconds/units/date, Claude reset hints, and persisted usage windows; preserves held messages; shows an acpmux-owned retry with reset timing; restores scheduled retries after daemon restart; and emits a visible error after its bounded attempt window. Stop, close, newer prompt, movement, explicit retry, dispatch refusal, and daemon shutdown end each timer.Related designs and issues: HQ#5123 §3, HQ#4879 items 3-4, and audit PR #1544.
Performance
tools/usage-report run --days 14 --githubplus the same session-ending scanValidation
435ac10d1a1and subsequent implementation commits through1e92656adcecover forced 429/502/503/harness_unavailable, weekly reset timing, queue preservation, restart restore, and stop/close behavior.cd cmux-tui && cargo test -p acpmux --test hub_integration limit_recovery -- --nocapturethrough the hosted cmux-ci route. A prior hosted run ended without a broker receipt while shared quota was exhausted; the code was reviewed against the exact pushed head afterward.python3 scripts/cmux-next/prepush-gate.py: no new violations.verify-local.py: existing unrelated localization debt on basea1f302795f52c68f5ddfd400bafc39782551c169.Risk: normal. Reset scheduling uses the event log and existing session queue; retry timers stop on the conditions named above.
Changelog: none
Agent session: agent session