Repository navigation
fix(cloud-agent-next): stop terminal retries while sandbox sleeps - #8144
Conversation
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Executive SummaryBoth prior findings are resolved in Files Reviewed (3 files)
Targeted context checks: Previous Review Summary (commit b22992e)Current summary above is authoritative. Previous snapshots are kept for context only. Previous review (commit b22992e)Status: 2 Issues Found | Recommendation: Address before merge Executive SummaryThe confirmed regression remains for backgrounded terminal tabs, and the new terminal-error default can turn a single transient network failure into a dead terminal. Overview
Issue Details (click to expand)WARNING
Files Reviewed (10 files)
No memory leaks found in the changed client code: the new status subscription, its retry timer, and the Reviewed by deepseek-v4.1-flash-1017 · Input: 46.4K · Output: 7.2K · Cached: 382.5K Review guidance: REVIEW.md from base branch |
Summary
A restored terminal tab called
createTerminalevery ~5 seconds while the sandbox was asleep. The route-not-ready path reused the generic "until the workspace is prepared" result, which the web client treats as retryable.sandbox_stoppedmessage from the Session DO terminal projection when the sandbox is sleeping.sleepingon the web and stop the reconnect loop.The chat send/resume path is unchanged.
Verification
pnpm --filter cloud-agent-next typecheckpnpm --filter web typecheckpnpm --filter cloud-agent-next exec vitest run src/control-plane/session/terminals.test.tspnpm --filter cloud-agent-next exec vitest run src/router.test.ts -t "router terminal procedures"terminal-utils.test.ts(12 tests) with a minimal Jest config; the repository Jest global setup requires a local Postgres instance that was not available here.