Cloud: automatically start new chats on the selected Cloud default (carry #29109)

Merged
TE
5d ago
+1560-77

Choosing Cloud in Settings > General > Agent Chat > Start New Chats In makes a new local chat's first send start on the user's Cloud machine. The existing environment picker overrides that preference for an individual chat. Existing remote chats retain their selected machine.

Leo, 2026-10-31: "whenever i start a chat it should be able to send me to cloud autommatically keep launching/downloading new dev builds and such". Leo, 2026-10-30: "like the initial 0 to 1 chat auto it sends to cloud".

Carries #29109 with its original commits and authorship after its lane retired. #29109 remains open for its owner to close. This carry restores the base streaming-animation test tolerance, removing an unrelated tightening identified by the earlier review. Prior art read: #28111, #28823, #26715, and #29109. Design: leo-workspace/design/cloud.md, design/cloud-work-mode.md, and design/composer.md.

The shared web code chooses the new-chat destination and sends a projectless chat with home: true, without uploading the private agent-home folder. Swift forwards the setting and request. Cloud startup keeps the account checks, ownership checks, and inline progress. The setting starts at This Mac; selecting Cloud makes later new chats use it automatically. Cloud startup is available outside Labs. This PR adds no backend code; the separate per-workspace VM work remains in #29532/#29582, and the local/cloud indicator landed in #28744.

Validation: web lint and the pre-push gate pass. Independent router review (gpt-6-astra high) returned SHIP at 5be228f504f3869c82bd3f874391a9987a0069fc. Focused fleet tests passed: 59 tests across 7 files, zero failures, covering Cloud requests, projectless starts, run-location defaults, progress, composer settings, the host event, and New Tab behavior. The application package tree is identical to #29109's source head (bff3f0c4f7594f00089e6537dede66b0d4d37c22), whose fleet Release compile passed. The general static preflight reports localization debt and workspace grouping drift, and cannot parse Swift on this Linux lane; those are not claimed as passing. This PR also waits for its finished per-test webview verdict before landing.

The review's nonblocking findings are already tracked: #29144 (fresh remote New Tabs need an origin check before applying the Cloud default) and #29143 (projectless starts must not inherit an existing remote project). #29624 also tracks pending-start reset, initial sandbox-state timing, and visual verification from the source PR. This carry owns the fix-forward; these issues stay open.

Risk: the Cloud preference routes new local chats to remote compute and may upload the explicitly selected project. Policy, sign-in, account revalidation, and per-chat overrides still apply. About 1,200 lines are generated localization/schema/managed-preference exports for the setting and progress text; splitting those from the feature would leave its exports inconsistent.

Agent session: agent session
šŸ¤– Generated with Claude Code