Repository navigation
acpmux: a turn a daemon restart cut off resumes by itself, before the queue behind it - #23921
Conversation
|
Owned by cx4-au23921 on huge-blue |
|
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 |
|
Bead |
|
Found 13 test failures on Blacksmith runners: Failures
...and 3 more test failures. View all on Blacksmith: run 40020181944, run 40020181945, run 40020181951
|
|
Orphaned: no activity for 13 h, and no lane holds a lease on it. Adopted by the orphan sweep: merged |
|
|
|
|
|
Orphaned: no activity for 54 h, and no lane holds a lease on it. The orphan sweep could not merge |
…red queue When the agent ended with the daemon, the new daemon settles the open turn outcome_unknown and queues one continuation at the head of the chat's queue: it quotes the cut turn's prompt and its steers, runs once across further crashes (prompt id <P>~resume-<n>, logged before the turn_result), and is recorded as auto_resume_scheduled reason daemon_restart. Agent-Session: 01a15ca9-5ac5-7692-adfc-a3ae828256ca Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?harness=claude&session=01a15ca9-5ac5-7692-adfc-a3ae828256ca&host=huge-blue
…trust gate Codex review of #23921: - A daemon that stopped between the continuation's queued record and its queue_order restored it behind the queue; restore_queue now puts a daemon_restart continuation at the head (a later reorder still holds). - The continuation hard-coded trustGate false; turn_started now records the cut turn's trust gate and the continuation carries it (a log from before that checks a web turn again). - Images in the cut prompt or its steers were dropped; they are read back from attachments and sent again. prompt_supersede's restart test (from #23733, newer than this PR) turns restart continuation off: its until-cancel turn would otherwise run again ahead of the queue. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?harness=claude&session=01a167e2-7b7b-7aa3-8fcb-5b845bd68fdb&host=huge-blue
The supersede-after-restart test waited for the replacement's answer before resume_queues, so the restored continuation of the cut turn (ahead of it in the queue, as Leo asked: it resumes what it interrupted) never ran and the test deadlocked. Supersede itself was intact (replaced: 1). Resume first, then wait; also check the cut turn went on. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?harness=claude&session=01a167e2-7b7b-7aa3-8fcb-5b845bd68fdb&host=huge-blue
…st gate Codex re-review of #23921: the continuation took control and trust gate from turn_started alone, so a local turn a Web steer had raised (turn_control) went on as local with no folder-trust check. It now applies turn_control, and a Web continuation is always gated. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?harness=claude&session=01a167e2-7b7b-7aa3-8fcb-5b845bd68fdb&host=huge-blue
7039b85 to
54f69e0
Compare
|
|
|
|
|
|
|
Shipped in:
|
![Fix with [code]smith](https://pr-comments-assets.blacksmith.sh/codesmith/fix-with-codesmith-light-3x.png)
Leo's exact words: "ACPMUX daemons, peer routing and messaging across machines."
A daemon restart can interrupt a turn after its agent host has exited. Before this change, acpmux marked that turn
outcome_unknownand immediately ran prompts queued behind it, leaving the interrupted work idle until a person typed “continue”.This PR makes the restart recovery resume the interrupted turn first:
outcome_unknownresult. The continuation uses the cut prompt's next attempt id (<prompt>~resume-<n>), quotes the original prompt and steers, and records_meta.provenance.kind=auto_resumewithreason=daemon_restart.queue_orderis written. Prompts queued behind the cut turn remain behind it and each runs once.autoResumeDelaysMs: []and stop a restart chain after the existing four-attempt bound.Leo's call is limited to daemon restart recovery; the daemon update schedule and trigger remain in #23199.
Changelog
Fixed: acpmux resumes a turn interrupted by a daemon restart before running prompts queued behind it.
Verification
598b2a5b4bc5b229b3fdf56f0ca3882e642ce178: selected durable-agent test, Rust MSRV, Go pane, and daemon artifact jobs passed.cmux-tui/crates/cmux-tui-core/src/mux/resource_topology/creation_settlement.rs:35, which this PR does not touch.rustfmt --edition 2024 --checkandgit diff --checkpass. Native app builds were not run locally.Risk: risk:normal.
Agent session: huge-blue