Skip to content

cmux NEXT: Cloud, the environment picker and Sandboxed runs are not behind Labs - #29059

Merged
teamleaderleo merged 15 commits into
feat-cmux-nextfrom
lane/cloud-out-of-labs
Oct 31, 2026
Merged

teamleaderleo merged 15 commits into
feat-cmux-nextfrom
lane/cloud-out-of-labs

Conversation

@teamleaderleo

@teamleaderleo teamleaderleo commented Oct 31, 2026 •

Copy link
Copy Markdown
Collaborator

Leo, 2026-10-30:

"WHAT GOOD REASON DO WE HAVE IN THE FIRST PLACE TO KEEP THIS STUFF IN FING LABS IF I FING ASKED FOR THESE F***ING FEATURES"

and earlier, on "Turn on Labs in Settings. Cloud first send refuses to run with Labs off.":

"that seems dumb. i dont like putting so much stuff in labs"

What changes

With labs.previewFeatures off (the default):

  • The composer's environment picker (design/environment-picker.md) is the agent page's computer control in New Tab and in the chat composer. It has This Mac, My machines and Cloud and VMs sections, ⌥⌘1–9, New Cloud Machine, Open Cloud…, SSH…, Connect Phone…, Add Machine…, and saved environments on New Tab. Before this PR, Labs off gave the plain Computer menu. (App.tsx: environments={preview} becomes environments.)
  • Move to Cloud / Bring Back Local in a started chat's picker, and Pause/Resume of a Cloud chat's machine in the chat menu (cloudChat, cloudMachineRows). Before, both needed Labs.
  • Sandboxed runs: a new chat's Run as offers Sandboxed (New Cloud Machine's ⌥ face). The app's sandbox.run, the CLI's runs.sandbox.create (cmux run --sandboxed) and vm.agent_key.create no longer refuse with labs_off. The two dead labsOff strings are removed from Runs.xcstrings.
  • A fresh home with only this Mac keeps Add Machine… and New Cloud Machine… in the picker after a chat starts, which Computer picker: expose first-computer setup without Labs #27083 provided for the plain menu.

Safety checks that stay (not Labs)

  • Cloud allowed by policy (disabledFeatures.contains(.cloud), policyRefusal, mayCallCloud).
  • A signed-in account (not_signed_in).
  • An explicit pick or command. A paid VM is only created when the person picks New Cloud Machine, Move to Cloud or Sandboxed and sends, or runs cmux run --sandboxed. Nothing creates one automatically. Waiting on or cancelling an existing run stays open whatever the policy says.

What stays behind Labs, and why

labs.previewFeatures still gates the session coverage label in the chat header (a prototype policy detail), Stats, the music player, Click by Hint (Leo, 10-11: "who wants this feature", so opt-in by his call) and the App Store (Leo, 10-27: "remove app store for now"). What's New's palette entry is ungated in #29061. Not touched here: Voice Room (Lawrence's unofficial experiment), labs.machineJoin (its join routes answer only on the dev platform), labs.classicHome (a legacy fallback). Dev-only surfaces stay off by default (cmux#22662).

Overlap

Before / after

Fresh home, New Agent Chat in /tmp, destination picker opened, labs.previewFeatures at its default (off). Real app at 2x on a fleet capture mini, light and dark, with synthetic data (a fresh home). Steps are in the capture marker's state.

Before (base 32761cbcfc64): the plain Computer menu with only Studio Mac, "Add a computer…" and "New Cloud Machine…".

Capture steps-b14387dd83-2x at 32761cbcfc64 (fleet build, capture mini, text checked for private data)

Light Dark
light dark

After (e8e4fce175d7; later commits change only tests): the environment picker. This Mac (Studio Mac, ⌥⌘1, checked), Cloud and VMs (New Cloud Machine… "Keeps working while your Mac sleeps", Open Cloud…), New environment (SSH…, Connect Phone…, Add Machine…), plus New Worktree beside the folder.

Capture steps-b14387dd83-2x at e8e4fce175d7 (fleet build, capture mini, text checked for private data)

Light Dark
light dark

I viewed the after images in both themes. Verdict: it's the picker Lab users already had, one searchable list in decision order with no repeated controls per row, and it fits on screen beside the composer. It would sit fine next to Claude desktop's environment picker.

Validation

  • Fleet compile check of the app at e8e4fce175d7: passed (job f3bab27d5885f7cd2a5de26f).
  • Webviews, cmux-ci test on Blacksmith/Linux pool: typecheck plus 16 picker, composer, sandbox and New Tab test files. All pass except computer-picker-onboarding, whose last failure (the New Cloud Machine row was below the fold of a 650 px frame) is fixed at the head and passes alone (fleet job 91a45b5defca9d9a657b61d4).
  • Tests updated: computer-picker-onboarding (first-computer setup through the environment picker) and menu-pointer-close-focus/composer-location-strip (the control is now named "Environment").
  • New Worktree is the control beside the folder in the environment picker, so the agent-pane.start-folder gallery plays click it there and new-tab-warm-first-frame reads it in the location strip (the gallery health and webview own reds at a8506409).

🤖 Generated with Claude Code

Agent session: agent session

teamleaderleo and others added 2 commits October 30, 2026 23:12
…ehind Labs

Leo, 2026-10-30: "WHAT GOOD REASON DO WE HAVE IN THE FIRST PLACE TO KEEP THIS SHIT IN
FUCKING LABS IF I FUCKING ASKED FOR THESE FUCKING FEATURES" and "i dont like putting so
much stuff in labs".

The agent page's composer always opens the environment picker (Local, My machines, Cloud
and VMs, Move to Cloud / Bring Back Local, the account's Cloud machines with Pause and
Resume), and a new chat's Run as offers Sandboxed, whatever labs.previewFeatures says.
The app's sandbox.run, the CLI's runs.sandbox.create and vm.agent_key.create no longer
refuse with labs_off. Cloud's own checks stay: Cloud allowed by policy, a signed-in
account, and an explicit pick or command; nothing creates a VM without one.
labs.previewFeatures still gates the session coverage label and the other preview pages.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-3bab30503f0b9a7059e5
…s follow the picker out of Labs

With the picker always on, a started chat with only this Mac listed keeps Add Machine… and
New Cloud Machine… (#27083), and the gallery tests look for the Environment control.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-3bab30503f0b9a7059e5
@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Owned by an agent session · session

@github-actions

github-actions Bot commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

cmux status (one comment, edited in place; each line is updated by the job that owns it)

Review e9119b7: HQ feed card · gallery before/after runs · checks

App of this head (app.zip, kept 1 day)

gh workflow run reload-build.yml -R manaflow-ai/cmux --ref feat-cmux-next -f tag=pr29059 -f ref=lane/cloud-out-of-labs -f platform=macos -f backend_mode=local

Gallery before/after for e9119b7: 16 states rendered, 0 images differ, 2654 more touched states not rendered. Images are in the run's artifact, not on this public PR; the independent review of this head reads them on its own, so the PR needs no hand-made screenshots of these states.

gh run download 41212796027 -R manaflow-ai/cmux -n gallery-advisory-29059-e9119b74c38f28ee0b9646eaa1c34e8f2b10b62a (then read gallery-review.json)

States
State Theme Status Diff Picked by
agent-pane.chat-width/standard Apple System Colors Light unchanged 0% own App.tsx
agent-pane.chat-width/standard Apple System Colors unchanged 0% own App.tsx
agent-pane.chat-width/wide Apple System Colors Light unchanged 0% own App.tsx
agent-pane.chat-width/wide Apple System Colors unchanged 0% own App.tsx
agent-pane.chat-width/wide-blocks Apple System Colors Light unchanged 0% own App.tsx
agent-pane.chat-width/wide-blocks Apple System Colors unchanged 0% own App.tsx
agent-pane.composer/font-size-chat-14 Apple System Colors Light unchanged 0% own ComposerContext.tsx
agent-pane.composer/font-size-chat-14 Apple System Colors unchanged 0% own ComposerContext.tsx
agent-pane.composer/font-size-new-chat-14 Apple System Colors Light unchanged 0% own ComposerContext.tsx
agent-pane.composer/font-size-new-chat-14 Apple System Colors unchanged 0% own ComposerContext.tsx
agent-pane.composer/font-size-new-tab-14 Apple System Colors Light unchanged 0% own ComposerContext.tsx
agent-pane.composer/font-size-new-tab-14 Apple System Colors unchanged 0% own ComposerContext.tsx
agent-pane.composer/font-size-chat-21 Apple System Colors Light unchanged 0% own ComposerContext.tsx
agent-pane.composer/font-size-chat-21 Apple System Colors unchanged 0% own ComposerContext.tsx
agent-pane.composer/font-size-new-chat-21 Apple System Colors Light unchanged 0% own ComposerContext.tsx
agent-pane.composer/font-size-new-chat-21 Apple System Colors unchanged 0% own ComposerContext.tsx
agent-pane.composer/font-size-new-tab-21 Apple System Colors Light unchanged 0% own ComposerContext.tsx
agent-pane.composer/font-size-new-tab-21 Apple System Colors unchanged 0% own ComposerContext.tsx
agent-pane.composer/font-size-chat-28 Apple System Colors Light unchanged 0% own ComposerContext.tsx
agent-pane.composer/font-size-chat-28 Apple System Colors unchanged 0% own ComposerContext.tsx
agent-pane.composer/font-size-new-chat-28 Apple System Colors Light unchanged 0% own ComposerContext.tsx
agent-pane.composer/font-size-new-chat-28 Apple System Colors unchanged 0% own ComposerContext.tsx
agent-pane.composer-context/closed Apple System Colors Light unchanged 0% own ComposerContext.tsx
agent-pane.composer-context/closed Apple System Colors unchanged 0% own ComposerContext.tsx
agent-pane.composer-context/folder-menu Apple System Colors Light unchanged 0% own ComposerContext.tsx
agent-pane.composer-context/folder-menu Apple System Colors unchanged 0% own ComposerContext.tsx
agent-pane.composer-context/folder-pinned-search Apple System Colors Light unchanged 0% own ComposerContext.tsx
agent-pane.composer-context/folder-pinned-search Apple System Colors unchanged 0% own ComposerContext.tsx
agent-pane.composer-context/folder-short-note Apple System Colors Light unchanged 0% own ComposerContext.tsx
agent-pane.composer-context/folder-short-note Apple System Colors unchanged 0% own ComposerContext.tsx
agent-pane.composer-context/folder-short-note-de Apple System Colors Light unchanged 0% own ComposerContext.tsx
agent-pane.composer-context/folder-short-note-de Apple System Colors unchanged 0% own ComposerContext.tsx

Pick other states with a Gallery: entry.id, entry.id/variant line in the PR body.

Passes: CI passes on e9119b74c3.

CI passes on e9119b74c3 (run 41213161991 attempt 1).

Written by scripts/ci/classify_failures.py (ci-failure-attribution.yml); signatures are its SIGNATURES table. A machine verdict is the runner's fault, not this PR's; yours means the failing file is one this PR changes, also red on main that main's latest full suite fails the same way, seen on other PRs that it failed on another pull request's run lately.

web and size checks: green

Default changes

This pull request changes 1 default at e9119b74c38f (what everyone gets without configuring anything):

  • tunable-source.CmuxNextApp/Control/AppControl+VMAgentKey.swift:vmText: "aa12a983a1446a2668e7aac8f3130fb2abd1c99adefe112711847754faf1f963" -> "35643bfdbda4cca63f2286fb306e562ecba2e7016a670ce1d7de1b376ae5530f"

Signed off on this commit by review (codex, router-review).

Merge receipt: merged as 861de783681f with these defaults changed, signed off by review (codex, router-review).

Regenerate the snapshot with python3 scripts/ci/defaults_guard.py snapshot.

Shipped in:

@blacksmith-sh

blacksmith-sh Bot commented Oct 31, 2026 •

Copy link
Copy Markdown

Found 1 test failure on Blacksmith runners:

Failure

Test View Logs
test_every_listed_hook_is_one_glaeda_released_with_the_check (main.SigningHooksInSt
epWithGlaedaTests.test_every_listed_hook_is_one_glaeda_released_with_the_check)/
test_every_listed_hook_is_one_glaeda_released_with_the_check (main.SigningHooksInSt
epWithGlaedaTests.test_every_listed_hook_is_one_glaeda_released_with_the_check)
View Logs

Fix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.

…nd say which rows it had

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-3bab30503f0b9a7059e5
…ent picker

New Worktree is the control beside the folder in the environment picker, not a
folder-menu option, so the start-folder plays click it there and the New Tab
first-frame test reads it in the location strip.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-3bab30503f0b9a7059e5
@teamleaderleo
teamleaderleo marked this pull request as ready for review October 31, 2026 08:28
@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Review (codex, router-review): SHIP at 96f7639

Reviewer: codex gpt-6-astra high, fast tier.

Follow-ups: 2. Each lands as an issue in this repo that links this receipt; the lane that opened the PR fixes it forward.

SHIP at 96f7639
Visual verdict: no images; Leo tries the build

  1. [P1][follow-up] CloudChatPick.read still requires labs.previewFeatures at CloudChatPick.swift:23. With Labs off, Cloud move/setup silently loses work-mode autosizing and repository suggestions, so Cloud is only partially un-gated despite the PR description.

  2. [P2][follow-up] No after screenshots or gallery artifact were supplied (review/images/README.txt).

Follow-ups:

  • [P1][follow-up] Remove or explicitly scope the remaining CloudChatPick Labs gate.
  • [P2][follow-up] Add after screenshots or gallery captures.

@teamleaderleo teamleaderleo removed the risk:normal Risk tier (docs/ci/risk-tiers.md) label Oct 31, 2026
@github-actions github-actions Bot added the risk:normal Risk tier (docs/ci/risk-tiers.md) label Oct 31, 2026
@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Review (codex gpt-6.1-sol xhigh, router-review): BLOCK at 6c2e29c

BLOCK at 6c2e29c

Visual verdict: Both after screenshots reviewed. Comparable to Claude’s compact picker; no repeated controls, bloated menu, or clipping.

  1. [P1] [blocking] Preserve existing machine-load warnings — App.tsx:11531. With Labs off and “Show Machine Load Warnings” enabled, the Computer menu currently warns about overloaded remote machines. Always enabling environments removes those warnings: ComposerContext calculates them only for menuComputers, while EnvironmentPicker receives raw computers and never renders resource warnings. This regresses a working, default-on feature. Carry the warnings into the environment picker; existing warning tests exercise only environments=false.

Validation: Changed TypeScript/TSX files parse, and the Runs catalog is valid with no remaining callers of deleted keys. Full tests were unavailable because Bun, Swift, and project dependencies are absent.

@teamleaderleo teamleaderleo removed the risk:normal Risk tier (docs/ci/risk-tiers.md) label Oct 31, 2026
@github-actions github-actions Bot added the risk:normal Risk tier (docs/ci/risk-tiers.md) label Oct 31, 2026
With the picker always on, a ready machine at its CPU or memory budget lost the
warning the plain Computer menu showed. The picker row now shows the same text
in the warning colour, behind the same setting, and never on a machine that is
not ready.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-3bab30503f0b9a7059e5
…warning flag is a boolean)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-3bab30503f0b9a7059e5
…out-of-labs

# Conflicts:
#	webviews/src/agent-session/acpmux/ComposerContext.tsx
@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Review (codex, router-review): SHIP at e4c333a

Reviewer: codex gpt-6-astra high, fast tier.

SHIP at e4c333a

Visual verdict: The environment picker screenshots show no repeated controls, clipping, or off-screen layout.

No correctness findings.

Follow-ups: none

@teamleaderleo teamleaderleo removed the risk:normal Risk tier (docs/ci/risk-tiers.md) label Oct 31, 2026
@github-actions github-actions Bot added the risk:normal Risk tier (docs/ci/risk-tiers.md) label Oct 31, 2026
Base removed its last reader (the session coverage label), so vp lint flagged it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-3bab30503f0b9a7059e5
@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Review (codex, router-review): SHIP at e9119b7

Reviewer: codex gpt-6.1-sol xhigh, fast tier.

SHIP at e9119b7

Visual verdict: Both after screenshots fit on screen, with clear grouping and no repeated row controls. Comparable to Claude’s environment picker.

No correctness findings. Source and localization checks passed. Runtime tests were unavailable because Bun, Cargo, and dependencies are absent.

Follow-ups: none

@teamleaderleo teamleaderleo removed the risk:normal Risk tier (docs/ci/risk-tiers.md) label Oct 31, 2026
@github-actions github-actions Bot added the risk:normal Risk tier (docs/ci/risk-tiers.md) label Oct 31, 2026
@teamleaderleo
teamleaderleo merged commit 861de78 into feat-cmux-next Oct 31, 2026
269 of 278 checks passed
@teamleaderleo
teamleaderleo deleted the lane/cloud-out-of-labs branch October 31, 2026 15:56
teamleaderleo added a commit that referenced this pull request Oct 31, 2026
Keeps base's always-on picker (#29059): machine load warnings on picker rows and the
docs saying the picker is not behind Labs, with this PR's two-row design and face style.
Drops base's second-line detail CSS, which the two-row design no longer renders.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-63b9964940c20354b639
teamleaderleo added a commit that referenced this pull request Oct 31, 2026
…in-cloud

#28686 landed as b0e10a0, and #29059 took Cloud, the environment picker
and Sandboxed out of Labs. Resolved:
- App.tsx: no `cloudOn`/`preview` gate is left (base offers Cloud and the
  picker always); `newChatsIn` still picks a new chat's run location.
- CloudStartChat.swift: base's refusal (Cloud off, signed out, app-server
  link), this PR's doc and `runHome`.
- New Tab: Do not work in a project with Cloud now goes as a start that
  copies nothing (`home`) instead of #28686's page-side refusal.
- CloudStartView: the step list keeps CloudStartStep's type (tsc).
- Settings schema and docs reference: newChatsIn in the Agent Chat group,
  count 534.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
teamleaderleo added a commit that referenced this pull request Oct 31, 2026
…ehind Labs since #29059

cloudOnly kept Sandboxed out of the picker when only the setting offered
Cloud, because the host refused sandbox.run without Labs. #29059 took
that gate out, so nothing set it and the guard was unreachable (the
review at 01d58a2). The picker is base's again.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-3bab30503f0b9a7059e5
teamleaderleo added a commit that referenced this pull request Oct 31, 2026
…arry #29109) (#29669)

* cmux NEXT Cloud: pick a chat's machine from its folder (repo, ref, size, task kind), sent as autosize

A chat sent to Cloud no longer needs a machine or size choice: CloudWorkPick reads the chat's
folder (repo key and GitHub repo from the remote, branch and whether it is pushed, git object
size, root files, task kind, .cmux/machine.toml, Codex broker) and Move to Cloud with no machine
to reuse, and New Cloud Machine from a chat, send its autosize with POST /api/vm. The answer's
sizePick stays on the machine's session for the hand-off. Behind Labs preview features.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-4ba8980ae4e8eecb82d6

* cmux NEXT Cloud pick: clone the upstream's branch name, no GitHub repo from a local remote, no pick on the app-server link

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-4ba8980ae4e8eecb82d6

* cmux NEXT Cloud: cloud.startChat, a new chat's first send started in Cloud with no machine or environment prompt

The page's Send with Cloud picked asks the host (`cloud.startChat {task, cwd, harness?, model?, key}`),
with Sandboxed's guards (a new chat, the Send's gesture, the replacements held, one at a time;
both now share AgentPaneHandOff). The App takes a Cloud machine as Move to Cloud does (a new one
sized by CloudChatPick), copies the folder with Move to Cloud's sync, opens the chat on the machine
with the prompt seeded as the person's, and closes this Mac's unstarted tab. Behind Labs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-4ba8980ae4e8eecb82d6

* cloud.startChat: the page's folder is optional; the tab's own folder otherwise

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-4ba8980ae4e8eecb82d6

* cloud.startChat: a started chat keeps the pane's hold; the folder must exist; the hand-off body is main-actor

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-4ba8980ae4e8eecb82d6

* cloud.startChat: only a chat on this Mac starts one; the App checks the tab's daemon is local

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-4ba8980ae4e8eecb82d6

* Composer: Cloud as where a new chat runs, a row at the top of the environment picker's Cloud section

Behind Labs. Picking it makes the first send call cloud.startChat; attachments are refused on
Cloud for now. Gallery: four states of the row.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-4ba8980ae4e8eecb82d6

* Composer Cloud: a Cloud pick not offered now is refused, never sent here; picking Cloud drops a saved environment and refocuses the prompt

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-4ba8980ae4e8eecb82d6

* Composer Cloud: tests for the picker's Cloud row, a saved environment dropped by a Cloud pick, and a refused send keeping its prompt

The not-offered refusal moves into cloudRun.ts so it is tested.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-4ba8980ae4e8eecb82d6

* Composer Cloud: format the new-tab test

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-4ba8980ae4e8eecb82d6

* Composer Cloud: the folder a Cloud send copies is the one the chip names, also when the tab inherited home

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-4ba8980ae4e8eecb82d6

* Gallery: the two other designs of where a new chat runs, gallery-only, beside the shipped Cloud row

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-4ba8980ae4e8eecb82d6

* Composer Cloud: one start at a time from a page; another Return while it waits starts nothing

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-4ba8980ae4e8eecb82d6

* Gallery: the switch design's group is a fieldset

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-4ba8980ae4e8eecb82d6

* Composer Cloud: a new chat's run location defaults from its folder's newest chat

A folder whose newest chat went to a Cloud machine (a Cloud start or Move to
Cloud) opens new chats with Cloud picked; otherwise this Mac, as before. The
history is acpmux's chat list: a Cloud chat is matched to the folder by the
folder the app's copy made on the machine (CloudMoveFolder remoteName under
CloudMoveSetup workRoots). Labs only, and a pick in the pane always wins.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-4ba8980ae4e8eecb82d6

* Composer Cloud default: a new chat's carried-over Cloud is a default its folder may undo; archived chats are not history

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-4ba8980ae4e8eecb82d6

* Composer Cloud default: a carried-over Cloud is marked in the folder default's effect, per chat

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-4ba8980ae4e8eecb82d6

* Composer Cloud default: no change while a Cloud start is out

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-4ba8980ae4e8eecb82d6

* Composer Cloud default: the folder default looks again once a Cloud start ends

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-4ba8980ae4e8eecb82d6

* Composer Cloud default: a chat starting here keeps the mode it starts with

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-4ba8980ae4e8eecb82d6

* Composer Cloud: a chat starting in Cloud shows its progress under the message, as metadata

The card shows the message, a spinner with the step, and the folder, machine, secrets and network
as the host learns them (a cloudStartProgress push keyed by the start), never a modal. Three
layouts behind the cloud-start-look experiment (chips, fact rows, step list), compared in the
gallery's agent-pane.cloud-start. On the New Tab page it shows over the box, without the bubble.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-4ba8980ae4e8eecb82d6

* Cloud start: the host tells the page's card each step (machine, folder, opening) as the start reaches it

cloud.startChat pushes a cloudStartProgress event keyed by the page's send before it takes a
machine, copies the folder and opens the chat; the shared page host hands it to the bridge.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-4ba8980ae4e8eecb82d6

* Cloud start card: spacing and sizes on the design token scale

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-4ba8980ae4e8eecb82d6

* AgentPageChats: the Cloud start runner's pane closure, typed (Xcode 26.6 could not type the map)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-4ba8980ae4e8eecb82d6

* Cloud start: the host pushes the folder and the machine's size; a failed card goes when the person picks another place

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-4ba8980ae4e8eecb82d6

* Cloud start: format

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-4ba8980ae4e8eecb82d6

* Cloud start gallery: the experiment's script has one step (an empty one does not load)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-4ba8980ae4e8eecb82d6

* cloud.startChat: the machine's chat starts on the picked model; type the seed's Cloud runner for Xcode 26.6

next-review's P2: CloudStartChat built the remote seed with the harness and prompt only,
so the model the page picked was dropped. AgentPaneCloudStart.seed(cwd:) now builds it
with the model too, with a test. The request carries no effort, so there is none to forward.

AgentPageChats.seed's Cloud runner is written out with its type, as #26921 does: #26921
found Xcode 26.6 could not type the map form.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-22973a84aab760788504

* cloud.startChat: a retry opens the same tab on the machine; the folder check reads off the main thread

next-review's BLOCK at b3389d1 (Codex gpt-6-astra): CloudStartChat opened the machine's
chat tab with a fresh creation key, so a retry of the same send after a lost answer could
make a second chat and send the prompt twice. The tab's key is now the send's own
(AgentPaneCloudStart.tabKey), with a test that a retry's key matches and another send's
does not.

The folder check (FileManager.fileExists) ran on the main actor; it now runs in a
@Concurrent helper (guardrails main-blocking).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-22973a84aab760788504

* cloud.startChat: copy only a folder the pane may name, each send into its own copy on the machine

Two blocking findings from the Codex review of #28686, both in this PR's code:

- The page named the folder whose tree is copied to Cloud, and the host only checked that it was
  absolute. A page script could name any folder on this Mac. The hand-off now takes the folder's
  canonical path (realpath, off the main actor) only when it is inside one of the pane's roots by
  components, the same roots AcpmuxPathPolicy uses for a chat that starts here: the pane's own and
  the New Tab scan's, never home or above it, plus the folders the person added. Anything else is
  refused with transport.path_outside_roots before the hold and the gesture. No folder from the
  page still means the tab's own folder, which the host reads.
- Every Cloud start from the same folder synced into the same folder on a reused machine, and
  Move to Cloud's sync overwrites every file the machine changed, so a second Cloud chat could
  write over the first one's work. A start now copies into its own place under the work root
  (chats/<send key>). A retry of the same send lands in the same copy.

Tests: a folder outside the roots, a link out of a root, a `..` path out of it, a missing
folder, the disk's root, home, and a folder under home when the pane's folder is home are all
refused and never reach the runner. The root's own folder still starts with its canonical path,
and a send's place is its own and stable for a retry.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-672a743921bc7917cca7

* fix(cloud.startChat): a first send takes this person's free machine, and its retry stays there

Leo (2026-10-30): "like the initial 0 to 1 chat auto it sends to cloud".

- The machine: never the team's first connected one (often someone's busy lane VM). A machine
  this person created that is free (no chat open, or idle-paused) or named for chats
  (cloud-chats[-N]), else a new one named cloud-chats. Lane-pool VMs (fs-lane-N, lane-vm-N)
  are never picked.
- #28845: CloudStartChat.Destinations pins each send key to the machine its first try took
  (newest 64, kept in the app's defaults), so a retry names that machine and its tab key gets
  the first try's tab back instead of a second chat with the prompt on another machine.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-3bab30503f0b9a7059e5

* fix(acpmux): a chat's first send that a revoked OAuth token failed goes again once, 2 s later

Leo (2026-10-30): "like the initial 0 to 1 chat auto it sends to cloud". On a fresh Cloud VM
the first Claude call failed once with "Failed to authenticate: OAuth token revoked" and the same
call 2 s later ran (cmux#28111 hand-walk, gap 5).

- claude_auth::is_revoked_token: only a revoked token, never expired/missing sign-in or an outage.
- hub/auto_resume/first_send.rs: on the chat's first turn only, and only for a prompt of its own
  (never a ~resume- attempt), the turn is resent once as P~resume-1 after 2 s through the Retry
  button's resend (retry_turn.rs resend_turn), under the chat's continuation mark, so Stop,
  close, a move or a person's prompt during the wait keep it from going. A retry that fails the
  same way is shown as before. Decisions are logged (first_send_retry, auto_resume_skipped).
- daemon/cloud_handoff.rs: such a turn is not reported failed before its retry is decided.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-3bab30503f0b9a7059e5

* fix(cloud.startChat): copy only a checked upload root, never copy a finished send again, create under the send's key

router-review BLOCK at 8b117be (gpt-6-astra), all three findings:

- [P1] The copy uploads the Git working copy that holds the page's folder. The pane now checks
  that upload root against its roots too (AgentPaneHandOff), hands it on as
  AgentPaneCloudStart.uploadRoot, and the App copies only that folder (CloudStartChat.uploads):
  a grant of /repo/paint never uploads /repo.
- [P1] Destinations records, per send key and machine, that the send's copy finished. A retry
  whose copy finished opens its chat by its tab key without pushing again, which would overwrite
  what the chat already changed there.
- [P2] A new machine for a send is created under AgentPaneCloudStart.createKey (from the send
  key), so a retry after a lost create answer gets the same machine, never a second VM.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-3bab30503f0b9a7059e5

* fix(cloud.startChat): no await inside the upload root check's autoclosure (fleet compile)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-3bab30503f0b9a7059e5

* feat(cloud): Start New Chats In: This Mac / Cloud (agentPane.newChatsIn)

Leo, 2026-10-31: "whenever i start a chat it should be able to send me to cloud
autommatically". A setting, off (This Mac) by default; set to Cloud, a new chat's
run location defaults to Cloud and its first send runs cloud.startChat. The
composer's environment picker (This Mac / Cloud) overrides it for one chat.
A chat with no project starts in the machine's own folder with nothing copied.
Cloud's start is no longer behind Labs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-3bab30503f0b9a7059e5

* chore(settings): regenerate exports for agentPane.newChatsIn

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-3bab30503f0b9a7059e5

* fix(cloud): Sandboxed stays behind Labs when only the setting offers Cloud; no copy step for a no-project start

Review BLOCK at 4f6d4a5 (router-review, gpt-6-astra): [P1] Start New Chats In: Cloud
exposed Sandboxed with Labs off; [P2] a no-project start's step list showed the copy step.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-3bab30503f0b9a7059e5

* test(cloud): the Cloud-only picker test takes KeyboardEvent from its DOM

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-3bab30503f0b9a7059e5

* fix(cloud start): a no-project start compiles, rechecks the account, and never copies agent-home

The review of #29109 at 21b19e1 blocked on three:
- runHome called machine(for:invocation:pick:) without the `account:`
  base added, so the target did not compile.
- runHome did not check the account after the machine connected; it now
  does, as a start with a folder does, so an account switch meanwhile
  opens nothing on the old account's machine.
- cloudStartFolder sent a no-project chat's private agent-home folder as
  a project to copy; it is `home` now (sessionList.ts isAgentHome).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-3bab30503f0b9a7059e5

* refactor(cloud start): a no-project start shares run's open step; the chats machine names move to CmuxNextAgentPane

runHome duplicated run's tail (open the chat on the machine, select it,
close this Mac's tab); both now call one `open(_:tab:on:cwd:)`. With the
pure machine-name rules (chatsName, isMarkedForChats, isLanePool,
newMachineName) moved to CmuxNextAgentPane beside #29566's Step and
sizeText, CmuxNextApp is 8 lines smaller than base, so arch-ratchet's
app_lines row (which #28686 tripped) holds.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-3bab30503f0b9a7059e5

* refactor(cloud start): drop RunModeRows.cloudOnly; Sandboxed is not behind Labs since #29059

cloudOnly kept Sandboxed out of the picker when only the setting offered
Cloud, because the host refused sandbox.run without Labs. #29059 took
that gate out, so nothing set it and the guard was unreachable (the
review at 01d58a2). The picker is base's again.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-3bab30503f0b9a7059e5

* fix(cloud start): newChatsIn has an agent policy; a tab on another machine never defaults to Cloud

The review at 3c558fc blocked on two:
- agentPane.newChatsIn was in neither agent-policy table, so
  SettingsSchemaExportTests.everyKeyHasAnExplicitAgentPolicy failed. It is
  refused to agents as .privacy: it decides whether a chat's project is
  copied to a Cloud machine.
- With Start New Chats In: Cloud, a fresh SSH or Cloud tab defaulted to
  Cloud, and its first send went to cloud.startChat, which the host
  refuses there. The run-location default now applies only to tabs on
  this Mac.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-3bab30503f0b9a7059e5

* Keep the base streaming test tolerance in Cloud first-send carry

Agent-Session: https://cmux.com/deeplink/agent?id=aid-1b76b6a4a44aaf394aea

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
teamleaderleo added a commit that referenced this pull request Oct 31, 2026
#29059 took Cloud and Sandboxed runs out of Labs, but `cmux run --sandboxed --help`
(en, ja) still told people to turn on Labs > Show Preview Features, and exit 3's text
still said "turn on Labs". Drop that, and fix the comments that still called the
sandbox Run methods and the server allowlist "behind Labs".

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-3bab30503f0b9a7059e5
teamleaderleo added a commit that referenced this pull request Oct 31, 2026
)

#29059 took Cloud and Sandboxed runs out of Labs, but `cmux run --sandboxed --help`
(en, ja) still told people to turn on Labs > Show Preview Features, and exit 3's text
still said "turn on Labs". Drop that, and fix the comments that still called the
sandbox Run methods and the server allowlist "behind Labs".


Agent-Session: https://cmux.com/deeplink/agent?id=aid-3bab30503f0b9a7059e5

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
teamleaderleo added a commit that referenced this pull request Nov 1, 2026
…he Start New Chats In: Cloud choice (#29109)

* cmux NEXT Cloud: pick a chat's machine from its folder (repo, ref, size, task kind), sent as autosize

A chat sent to Cloud no longer needs a machine or size choice: CloudWorkPick reads the chat's
folder (repo key and GitHub repo from the remote, branch and whether it is pushed, git object
size, root files, task kind, .cmux/machine.toml, Codex broker) and Move to Cloud with no machine
to reuse, and New Cloud Machine from a chat, send its autosize with POST /api/vm. The answer's
sizePick stays on the machine's session for the hand-off. Behind Labs preview features.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-4ba8980ae4e8eecb82d6

* cmux NEXT Cloud pick: clone the upstream's branch name, no GitHub repo from a local remote, no pick on the app-server link

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-4ba8980ae4e8eecb82d6

* cmux NEXT Cloud: cloud.startChat, a new chat's first send started in Cloud with no machine or environment prompt

The page's Send with Cloud picked asks the host (`cloud.startChat {task, cwd, harness?, model?, key}`),
with Sandboxed's guards (a new chat, the Send's gesture, the replacements held, one at a time;
both now share AgentPaneHandOff). The App takes a Cloud machine as Move to Cloud does (a new one
sized by CloudChatPick), copies the folder with Move to Cloud's sync, opens the chat on the machine
with the prompt seeded as the person's, and closes this Mac's unstarted tab. Behind Labs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-4ba8980ae4e8eecb82d6

* cloud.startChat: the page's folder is optional; the tab's own folder otherwise

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-4ba8980ae4e8eecb82d6

* cloud.startChat: a started chat keeps the pane's hold; the folder must exist; the hand-off body is main-actor

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-4ba8980ae4e8eecb82d6

* cloud.startChat: only a chat on this Mac starts one; the App checks the tab's daemon is local

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-4ba8980ae4e8eecb82d6

* Composer: Cloud as where a new chat runs, a row at the top of the environment picker's Cloud section

Behind Labs. Picking it makes the first send call cloud.startChat; attachments are refused on
Cloud for now. Gallery: four states of the row.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-4ba8980ae4e8eecb82d6

* Composer Cloud: a Cloud pick not offered now is refused, never sent here; picking Cloud drops a saved environment and refocuses the prompt

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-4ba8980ae4e8eecb82d6

* Composer Cloud: tests for the picker's Cloud row, a saved environment dropped by a Cloud pick, and a refused send keeping its prompt

The not-offered refusal moves into cloudRun.ts so it is tested.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-4ba8980ae4e8eecb82d6

* Composer Cloud: format the new-tab test

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-4ba8980ae4e8eecb82d6

* Composer Cloud: the folder a Cloud send copies is the one the chip names, also when the tab inherited home

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-4ba8980ae4e8eecb82d6

* Gallery: the two other designs of where a new chat runs, gallery-only, beside the shipped Cloud row

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-4ba8980ae4e8eecb82d6

* Composer Cloud: one start at a time from a page; another Return while it waits starts nothing

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-4ba8980ae4e8eecb82d6

* Gallery: the switch design's group is a fieldset

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-4ba8980ae4e8eecb82d6

* Composer Cloud: a new chat's run location defaults from its folder's newest chat

A folder whose newest chat went to a Cloud machine (a Cloud start or Move to
Cloud) opens new chats with Cloud picked; otherwise this Mac, as before. The
history is acpmux's chat list: a Cloud chat is matched to the folder by the
folder the app's copy made on the machine (CloudMoveFolder remoteName under
CloudMoveSetup workRoots). Labs only, and a pick in the pane always wins.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-4ba8980ae4e8eecb82d6

* Composer Cloud default: a new chat's carried-over Cloud is a default its folder may undo; archived chats are not history

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-4ba8980ae4e8eecb82d6

* Composer Cloud default: a carried-over Cloud is marked in the folder default's effect, per chat

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-4ba8980ae4e8eecb82d6

* Composer Cloud default: no change while a Cloud start is out

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-4ba8980ae4e8eecb82d6

* Composer Cloud default: the folder default looks again once a Cloud start ends

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-4ba8980ae4e8eecb82d6

* Composer Cloud default: a chat starting here keeps the mode it starts with

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-4ba8980ae4e8eecb82d6

* Composer Cloud: a chat starting in Cloud shows its progress under the message, as metadata

The card shows the message, a spinner with the step, and the folder, machine, secrets and network
as the host learns them (a cloudStartProgress push keyed by the start), never a modal. Three
layouts behind the cloud-start-look experiment (chips, fact rows, step list), compared in the
gallery's agent-pane.cloud-start. On the New Tab page it shows over the box, without the bubble.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-4ba8980ae4e8eecb82d6

* Cloud start: the host tells the page's card each step (machine, folder, opening) as the start reaches it

cloud.startChat pushes a cloudStartProgress event keyed by the page's send before it takes a
machine, copies the folder and opens the chat; the shared page host hands it to the bridge.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-4ba8980ae4e8eecb82d6

* Cloud start card: spacing and sizes on the design token scale

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-4ba8980ae4e8eecb82d6

* AgentPageChats: the Cloud start runner's pane closure, typed (Xcode 26.6 could not type the map)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-4ba8980ae4e8eecb82d6

* Cloud start: the host pushes the folder and the machine's size; a failed card goes when the person picks another place

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-4ba8980ae4e8eecb82d6

* Cloud start: format

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-4ba8980ae4e8eecb82d6

* Cloud start gallery: the experiment's script has one step (an empty one does not load)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-4ba8980ae4e8eecb82d6

* cloud.startChat: the machine's chat starts on the picked model; type the seed's Cloud runner for Xcode 26.6

next-review's P2: CloudStartChat built the remote seed with the harness and prompt only,
so the model the page picked was dropped. AgentPaneCloudStart.seed(cwd:) now builds it
with the model too, with a test. The request carries no effort, so there is none to forward.

AgentPageChats.seed's Cloud runner is written out with its type, as #26921 does: #26921
found Xcode 26.6 could not type the map form.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-22973a84aab760788504

* cloud.startChat: a retry opens the same tab on the machine; the folder check reads off the main thread

next-review's BLOCK at b3389d1 (Codex gpt-6-astra): CloudStartChat opened the machine's
chat tab with a fresh creation key, so a retry of the same send after a lost answer could
make a second chat and send the prompt twice. The tab's key is now the send's own
(AgentPaneCloudStart.tabKey), with a test that a retry's key matches and another send's
does not.

The folder check (FileManager.fileExists) ran on the main actor; it now runs in a
@Concurrent helper (guardrails main-blocking).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-22973a84aab760788504

* cloud.startChat: copy only a folder the pane may name, each send into its own copy on the machine

Two blocking findings from the Codex review of #28686, both in this PR's code:

- The page named the folder whose tree is copied to Cloud, and the host only checked that it was
  absolute. A page script could name any folder on this Mac. The hand-off now takes the folder's
  canonical path (realpath, off the main actor) only when it is inside one of the pane's roots by
  components, the same roots AcpmuxPathPolicy uses for a chat that starts here: the pane's own and
  the New Tab scan's, never home or above it, plus the folders the person added. Anything else is
  refused with transport.path_outside_roots before the hold and the gesture. No folder from the
  page still means the tab's own folder, which the host reads.
- Every Cloud start from the same folder synced into the same folder on a reused machine, and
  Move to Cloud's sync overwrites every file the machine changed, so a second Cloud chat could
  write over the first one's work. A start now copies into its own place under the work root
  (chats/<send key>). A retry of the same send lands in the same copy.

Tests: a folder outside the roots, a link out of a root, a `..` path out of it, a missing
folder, the disk's root, home, and a folder under home when the pane's folder is home are all
refused and never reach the runner. The root's own folder still starts with its canonical path,
and a send's place is its own and stable for a retry.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-672a743921bc7917cca7

* fix(cloud.startChat): a first send takes this person's free machine, and its retry stays there

Leo (2026-10-30): "like the initial 0 to 1 chat auto it sends to cloud".

- The machine: never the team's first connected one (often someone's busy lane VM). A machine
  this person created that is free (no chat open, or idle-paused) or named for chats
  (cloud-chats[-N]), else a new one named cloud-chats. Lane-pool VMs (fs-lane-N, lane-vm-N)
  are never picked.
- #28845: CloudStartChat.Destinations pins each send key to the machine its first try took
  (newest 64, kept in the app's defaults), so a retry names that machine and its tab key gets
  the first try's tab back instead of a second chat with the prompt on another machine.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-3bab30503f0b9a7059e5

* fix(acpmux): a chat's first send that a revoked OAuth token failed goes again once, 2 s later

Leo (2026-10-30): "like the initial 0 to 1 chat auto it sends to cloud". On a fresh Cloud VM
the first Claude call failed once with "Failed to authenticate: OAuth token revoked" and the same
call 2 s later ran (cmux#28111 hand-walk, gap 5).

- claude_auth::is_revoked_token: only a revoked token, never expired/missing sign-in or an outage.
- hub/auto_resume/first_send.rs: on the chat's first turn only, and only for a prompt of its own
  (never a ~resume- attempt), the turn is resent once as P~resume-1 after 2 s through the Retry
  button's resend (retry_turn.rs resend_turn), under the chat's continuation mark, so Stop,
  close, a move or a person's prompt during the wait keep it from going. A retry that fails the
  same way is shown as before. Decisions are logged (first_send_retry, auto_resume_skipped).
- daemon/cloud_handoff.rs: such a turn is not reported failed before its retry is decided.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-3bab30503f0b9a7059e5

* fix(cloud.startChat): copy only a checked upload root, never copy a finished send again, create under the send's key

router-review BLOCK at 8b117be (gpt-6-astra), all three findings:

- [P1] The copy uploads the Git working copy that holds the page's folder. The pane now checks
  that upload root against its roots too (AgentPaneHandOff), hands it on as
  AgentPaneCloudStart.uploadRoot, and the App copies only that folder (CloudStartChat.uploads):
  a grant of /repo/paint never uploads /repo.
- [P1] Destinations records, per send key and machine, that the send's copy finished. A retry
  whose copy finished opens its chat by its tab key without pushing again, which would overwrite
  what the chat already changed there.
- [P2] A new machine for a send is created under AgentPaneCloudStart.createKey (from the send
  key), so a retry after a lost create answer gets the same machine, never a second VM.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-3bab30503f0b9a7059e5

* fix(cloud.startChat): no await inside the upload root check's autoclosure (fleet compile)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-3bab30503f0b9a7059e5

* feat(cloud): Start New Chats In: This Mac / Cloud (agentPane.newChatsIn)

Leo, 2026-10-31: "whenever i start a chat it should be able to send me to cloud
autommatically". A setting, off (This Mac) by default; set to Cloud, a new chat's
run location defaults to Cloud and its first send runs cloud.startChat. The
composer's environment picker (This Mac / Cloud) overrides it for one chat.
A chat with no project starts in the machine's own folder with nothing copied.
Cloud's start is no longer behind Labs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-3bab30503f0b9a7059e5

* chore(settings): regenerate exports for agentPane.newChatsIn

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-3bab30503f0b9a7059e5

* fix(cloud): Sandboxed stays behind Labs when only the setting offers Cloud; no copy step for a no-project start

Review BLOCK at 4f6d4a5 (router-review, gpt-6-astra): [P1] Start New Chats In: Cloud
exposed Sandboxed with Labs off; [P2] a no-project start's step list showed the copy step.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-3bab30503f0b9a7059e5

* test(cloud): the Cloud-only picker test takes KeyboardEvent from its DOM

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-3bab30503f0b9a7059e5

* fix(cloud start): a no-project start compiles, rechecks the account, and never copies agent-home

The review of #29109 at 21b19e1 blocked on three:
- runHome called machine(for:invocation:pick:) without the `account:`
  base added, so the target did not compile.
- runHome did not check the account after the machine connected; it now
  does, as a start with a folder does, so an account switch meanwhile
  opens nothing on the old account's machine.
- cloudStartFolder sent a no-project chat's private agent-home folder as
  a project to copy; it is `home` now (sessionList.ts isAgentHome).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-3bab30503f0b9a7059e5

* refactor(cloud start): a no-project start shares run's open step; the chats machine names move to CmuxNextAgentPane

runHome duplicated run's tail (open the chat on the machine, select it,
close this Mac's tab); both now call one `open(_:tab:on:cwd:)`. With the
pure machine-name rules (chatsName, isMarkedForChats, isLanePool,
newMachineName) moved to CmuxNextAgentPane beside #29566's Step and
sizeText, CmuxNextApp is 8 lines smaller than base, so arch-ratchet's
app_lines row (which #28686 tripped) holds.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-3bab30503f0b9a7059e5

* refactor(cloud start): drop RunModeRows.cloudOnly; Sandboxed is not behind Labs since #29059

cloudOnly kept Sandboxed out of the picker when only the setting offered
Cloud, because the host refused sandbox.run without Labs. #29059 took
that gate out, so nothing set it and the guard was unreachable (the
review at 01d58a2). The picker is base's again.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-3bab30503f0b9a7059e5

* fix(cloud start): newChatsIn has an agent policy; a tab on another machine never defaults to Cloud

The review at 3c558fc blocked on two:
- agentPane.newChatsIn was in neither agent-policy table, so
  SettingsSchemaExportTests.everyKeyHasAnExplicitAgentPolicy failed. It is
  refused to agents as .privacy: it decides whether a chat's project is
  copied to a Cloud machine.
- With Start New Chats In: Cloud, a fresh SSH or Cloud tab defaulted to
  Cloud, and its first send went to cloud.startChat, which the host
  refuses there. The run-location default now applies only to tabs on
  this Mac.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-3bab30503f0b9a7059e5

* Translate the Start new chats in: Cloud choice

The localization debt ratchet counted the new Cloud choice as copied
English in every locale. Use the translations the other Cloud labels
already use, and document Cloud as the established noun in de, fr and it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-3bab30503f0b9a7059e5

* Let agents set Start new chats in; keep the default off fresh remote tabs

- agentPane.newChatsIn joins the agent-settable composer keys, so
  `cmux settings set agentPane.newChatsIn cloud` works from a lane or an
  agent; each chat's composer still shows and can change the choice.
  The settings export says agent_settable, and a test sets it through
  the cli and mcp writers.
- The Cloud run default also stays off in a fresh SSH or peer tab whose
  origin is known before its summary (review follow-up on #29109).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-3bab30503f0b9a7059e5

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>

This branch was previously deployed

3 inactive (2 outdated) deployments
ci-routing-agent — e9119b74 Deployed Oct 31, 2026 by teamleaderleo via wait for same-key tree publisher #90308
artifacts — e4c333a0 Deployed Oct 31, 2026 by teamleaderleo via add the Windows daemon to the tree #90168
sentry-dsyms — e4c333a0 Deployed Oct 31, 2026 by teamleaderleo via upload cmux-tui dSYMs to Sentry #90168
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk:normal Risk tier (docs/ci/risk-tiers.md)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant