Repository navigation
fix(cloud-agent): keep busy cloud sessions in the active list without an open run - #8523
Conversation
… an open run Active now treated an open cloud run or a warm idle status as the only proofs of life. A cloud session between message turns keeps a non-idle status with no open run. The list then dropped a session that was still working. The same session reappeared only after it went idle, inside the warm window. Recorded session activity is now the third proof of life, inside the same recency window. The candidate carries its stored status, so a question or permission row still reports needs-input.
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Executive SummaryThe incremental change is a one-line, correct test-harness fix: the rendered cloud-candidate query now interpolates Assumptions: Files Reviewed (3 files)
Previous Review Summary (commit eacabae)Current summary above is authoritative. Previous snapshots are kept for context only. Previous review (commit eacabae)Status: No Issues Found | Recommendation: Merge Executive SummaryThe new Assumptions: Files Reviewed (2 files)
Reviewed by deepseek-flash-latest · Input: 47.9K · Output: 3K · Cached: 278.7K Review guidance: REVIEW.md from base branch |
The glanceable harness rewrites the Postgres recency cutoff into a SQLite literal. The list query now carries the cutoff twice, so a single replacement left Postgres syntax in the statement. Replace every occurrence.
Problem
Active now — the mobile Home live section and the Agents tab — can say "nothing is running" while a cloud agent works.
Cause
activeSessions.listtreated two things as proof that a cloud session is live:cloud_agent_session_runsrow, oridlestatus inside the recency window.A cloud session between message turns keeps a non-idle status with no open run. Both proofs then fail while the session is still active: session-ingest keeps recording activity, but nothing read it. The row came back only after the session went idle, so finished sessions appeared for a short time and running ones never did.
Change
last_activity_atis now the third proof of life, inside the same recency window. The candidate keeps its stored status, soquestionandpermissionrows still report needs-input.Verification