fix(cloud-agent): complete idle turns and surface resume/interrupt honestly - #5304
Conversation
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Executive SummaryIncremental review of the fix-up commits confirms all five previous findings are resolved: the Files Reviewed (7 files, incremental)
Previous Review Summary (commit c70ec24)Current summary above is authoritative. Previous snapshots are kept for context only. Previous review (commit c70ec24)Status: 5 Issues Found | Recommendation: Address before merge Executive SummaryThe snapshot-restore fallback introduces two resilience regressions — an uncaught Overview
Issue Details (click to expand)WARNING
SUGGESTION
Files Reviewed (18 files)
Reviewed by kimi-k3 · Input: 75.3K · Output: 4.6K · Cached: 275.2K Review guidance: REVIEW.md from base branch |
Skip a failed three-way reset instead of throwing, unlink deleted files after a failed patch, and treat a null assistant error as no error.
Summary
Fixes Cloud Agent idle/resume UX so completed sessions look finished and can be continued. Three P0s from
docs/plans/cloud-agent-idle-resume-ux.md:session.idlestill emits wrappercompleteeven if SSE timeout / ingest disconnect aborts during auto-commit. Capture complete intent at drain start so post-processing cannot drop it.git applyretries without--3wayand writes snapshotaftercontent when present. Session continues with restored files; skipped diffs fail visibly (snapshot_diffs_incomplete).MessageAbortedError/ user-interrupt terminalizes as interrupted, and the transcript shows Interrupted instead of a hanging last tool call.P1 keep-warm is covered by the complete event. Resume path is now explicit in bootstrap progress/telemetry. P2 title-report 502 is left as a follow-up.
Test plan
/cloud, environment prepares, first turn completes, UI leaves busy state onsession.idle(no spinner)