Repository navigation
cmux NEXT Cloud: Run New Workspaces in Cloud — each new workspace gets its own Freestyle VM (Fixes #26062) - #26078
Conversation
… its own machine A Cloud toggle (cloud.newWorkspacesInCloud, Settings > Machines and the palette's Toggle Setting, off by default). On, a person's New Workspace runs the New Cloud Workspace flow with a new Freestyle machine for every workspace. cloud.newWorkspaceFolder 'inherit' copies the git working copy around the focused folder there (cmux link sync push, ~/work then /root/work) and opens the terminal in the person's folder; 'empty' (or a home folder, never copied) opens in the machine's home. Scripts, the CLI, MCP and a named --machine keep their behavior. Fixes #26062 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ys local; agents can't set it The creation keeps its own open, so the progress view's Retry copies the folder again instead of opening a plain workspace. Cmd-N stays on this Mac while Cloud is signed out or unavailable, and a run with a command stays local. An app that can't copy a folder (no bundled CLI, app server link) starts the new machine empty instead of failing after making it. The two keys are privacy-refused for agents and placed under Accounts on the Settings page. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…d; Settings' VM host store moves there too The App takes no new file and no net growth: the toggle's decision and its copy loop are CloudNewWorkspacePlan in CmuxNextCloud, the App keeps one handler extension, and CloudVmHostStore (Foundation and CmuxNextCloud only) moves to its domain package. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
cmux status (one comment, edited in place; each line is updated by the job that owns it) Review App of this head (app.zip, kept 1 day)
Seen on other PRs too (likely flaky): CI failed on
Failures:
A web test can import code this PR changes without being one of its files: Matched log linesNot re-run automatically: Written by red: web / Web status; a job it gathers is red on this change (its line here); do not merge until green; see lane-rules Tour of Path-selected interactions
Core UI (before): DEGRADED — 20 ok, 1 unavailable
Screenshots (15)1. Launch
Screenshots (15)1. Launch Tours are data in Default changesThis pull request changes 27 defaults at
Needs a review. It passes with an independent review receipt on this commit: a comment or review whose first line is Merge receipt: merged as Regenerate the snapshot with Shipped in:
|
Correctness review (subagent), first head
|
| # | Severity | Finding | Resolution at 0b466436593 |
|---|---|---|---|
| 1 | blocker | New keys had no agent policy (everyKeyHasAnExplicitAgentPolicy) |
Both .privacy-refused in SettingsSchema+AgentPolicy.swift; test asserts it |
| 2 | blocker | settings.group.cloudWorkspaces had no home in SettingsPageLayout |
Placed under Accounts; SettingsPageLayoutHomeTests rerun on the fleet |
| 3 | blocker | Retry from the progress view rebuilt the default flow, losing the folder copy | CloudMachineCreation.open keeps the toggle's open; run uses it on every Retry |
| 4 | major | Signed out / Cloud unavailable turned Cmd-N into a failure page | Cmd-N stays on this Mac then |
| 5 | major | CLI / app-link preconditions checked only after a VM existed | Checked before the create; an app that can't copy starts the machine empty |
| 6 | major | Generated settings exports stale | Left to the PR autofix (never hand-edited) |
| 7 | minor | Cmd-N with a command dropped it; new-row debug timer; name dropped |
command now stays local; timer and name are follow-ups |
| 8 | minor | Only en/ja strings | All 21 locales (needs_review) |
| 9 | minor | Dotfiles .git in home makes subfolders start empty silently |
Follow-up: say why nothing was copied |
| 10 | minor | No window open: workspace only revealed | Follow-up with the UI pass |
Also, from the pre-push gate: the new App file was refused (no App growth). The plan and copy moved to CmuxNextCloud, and CloudVmHostStore moved there as the offset (App −74 source lines).
…rvation imported publicly Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Bead |
|
Found 9 test failures on Blacksmith runners: Failures
|
Verification at
|
Output of scripts/ci/run-swift-testing-suites.sh in export-settings mode on the fleet (cmux-ci step 4a65c0d0802f461f1c53afb3, f657bc5): the PR autofix could not run past the base's red ActionSurfaceParityTests. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ne socket fails instead of skipping the copy A plain folder (/Users, ~/Downloads, a disk) could hold anything, the home folder included: Current Folder now copies only a git working copy's top folder and starts any other folder empty. The copy no longer skips silently when the machine's socket is unknown. Drops a vendor keyword from the setting. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Deciding the plan reads no disk, so Cmd-N's turn does none; the creation's open resolves the git working copy on BackgroundWork's files lane with the checked FileManager seam. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…s makes nothing more Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Bugbot needs on-demand usage enabledBugbot uses usage-based billing for this team and requires on-demand usage to be enabled. A team admin can enable on-demand usage in the Cursor dashboard. |
|
Review (Codex independent review): SHIP at 1388f60 Fresh correctness-first subagent review of the complete 26-file diff against base
Coverage limits: the other 15 selected suites are still running and will be recorded in the description. Live provider creation/folder sync, current tagged-app dogfood, current native capture, performance, and optimized Release compilation were not independently exercised. The red lane also reported a separate same-tree cmux-tui component-key infrastructure error; its fake-daemon regression nevertheless compiled and executed. No skipped test is claimed as coverage. |
…ext-26062-cloud-toggle
Fleet step ea1838456e1c98cae6aae885 ran scripts/cmux-next/regenerate-settings-exports.sh at 11a38dc: all package/test targets compiled; 4 managed-preference and 6 schema-export tests passed. Applied the generated artifact directly, excluding the bot-owned defaults snapshot. The preservation audit confirms all 605 base schema rows plus the two Cloud settings (607 total), unchanged base web/MDM rows and metadata, and correct Cloud defaults and agent privacy refusals.
|
Review (Codex independent review): SHIP at 3bece71 Fresh correctness-first subagent review of the complete 26-file diff for #26078 against base
Not independently exercised: live Cloud provisioning/folder sync, a current tagged-app capture/dogfood session, performance measurements, or optimized Release compilation. These limits remain explicit in the description. The default Cloud toggle remains off. |
|
The compile reds on
The Mac action-export job also fails in its settings-regeneration compile with only those same two unique Swift errors. This is the same base compiler failure, not an observed settings-output mismatch. The separate focused Xcode 26.6 fleet job Further completed current-head checks:
The current-head fast tier has now failed as well. Its only two unique Swift errors are the identical base The official next-autoland pass 41257127641, snapshot |
|
Review (Codex independent review): SHIP at 0878faa PR: #26078 Fresh correctness-first review of the complete head against that exact base found no PR-caused blocker. Rechecked new-base integration, production creation/retry handling, no-window behavior, visible local-fallback reasons, and account/scope cancellation. Independent artifact comparisons preserve all base schema, MDM, documentation, and localization entries, with only the expected Cloud additions. This proves base preservation, not fresh export generation from all current source. Current-head fleet The earlier 132 passing test executions at Primary-agent audit independently rechecked the actual production/regression diff, current GitHub head and mergeability, complete check list, and generated/localization preservation; no additional PR-caused blocker found. The defaults guard needs this exact-head independent receipt; it will be rerun without changing source. |
|
Review (Codex independent review): SHIP at 58a6c97 Fresh correctness-first subagent review of the complete diff against Rechecked Cloud creation/retry, cancellation and account fences, no-window fallback, sidebar routing, agent restrictions, and integration with the new base's size picker, harness-login, and handoff paths. Independent artifact audit passed: all 605 base schema rows, 535 web-reference rows, 598 MDM properties, and metadata are preserved, with only the two expected settings added. All 1,492 Settings and 88 Cloud localization entries remain intact; additions cover 21 locales with placeholders preserved. This proves artifact preservation, not complete source-to-export freshness. Exact-head fleet Live signed-in Cloud provisioning/folder sync, current tagged-app dogfood/capture, optimized Xcode Release compilation, and performance remain unverified. Earlier base compiler failures are historical. The primary agent independently checked the actual diff, artifact audit, test output, head and mergeability; no additional blocker found. PR: #26078 |
|
Current-head check classification at
No unrelated source repair or new check was added for the base finding. Current-tip confirmation: base |
Preserve the current base and Cloud workspace toggle. Apply complete settings exports from CI artifact 13065934303 (SHA-256 275c8570ed88550f9ae12df1e0ef867d1ba3423f355cac29bc6d759eaa519db0); exclude the bot-owned defaults snapshot. No runtime source changes beyond the normal base merge. Prior head focused fleet verification: 16 filters, 133 executions passed; this merge will receive fresh exact-head verification.
Bugbot needs on-demand usage enabledBugbot uses usage-based billing for this team and requires on-demand usage to be enabled. A team admin can enable on-demand usage in the Cursor dashboard. |
Use ActionInvocation.isPersonsOwnRun so socket claims and app, agent or terminal attribution cannot provision a Cloud workspace through the toggle. The preceding regression covers all four claims; red and green execution is queued through cmux-ci on the published commits.
Preserve both source sides. Apply the complete canonical web settings reference from cmux-ci step 4713e214e53f8a26b315dbf9 at e0e3fac (artifact SHA256 9bb05acf2b62ec0dc2fa4bcf76dda10f00c78ea629c5bb82def61709aa0f8bc7). Generation inputs are semantically unchanged; all 536 current-base reference rows remain and the two Cloud settings bring the total to 538. The bot-owned defaults snapshot is excluded. Prior focused fleet verification passed 18 suites and 143 tests; final-head verification follows.
Bugbot needs on-demand usage enabledBugbot uses usage-based billing for this team and requires on-demand usage to be enabled. A team admin can enable on-demand usage in the Cursor dashboard. |
|
Base finding for head
This is a base finding, so no unrelated Rust change is included in this Cloud toggle PR. |
|
Review (Codex independent review): SHIP at a4e2b9b Fresh correctness-first subagent review covered all 26 changed files against base Independently inspected execution evidence:
Defaults and behavior reviewed: Cloud creation defaults off; the folder mode defaults to Canonical generated exports and localization audit pass; base entries are preserved. The Windows failure is base-owned: the Rust tree is unchanged and an unrelated PR has identical Not verified: live signed-in Cloud provisioning/folder synchronization, a new tagged-app dogfood/capture, optimized Xcode Release compilation, or performance measurements. No builds or tests ran on the local Mac. |
|
Merge service hold (P0 title rule in merge-batch.py, The proof it reads:
The body names 4de25f3cff892ca14fe0b6e4 (done, at the head), but it has no display label: it ran as a plain |
|
The two newly completed guard failures at
The workflow, test, package-script and runner-picker files involved are unchanged between this PR and its merged base |
|
Confirmed on the base itself: Windows control run 41270969207, dispatched from the existing unchanged workflow at This supplements the unrelated-PR reproduction and unchanged Rust-tree evidence. No Rust or CI source was changed for this control. |
|
Current head remains The official autoland verdict still rejects inherited failures despite the matching guard logs and matching base Windows control. A second Windows control at newer base Read-only independent diagnosis of the official evidence snapshot found stale unsigned workflow/bundle records overriding newer signed records of the matching base failures. The normalized head/base failure signatures match, but the classifier discards that evidence before comparison. Normal check reruns do not remove these preserved ancestor records. No PR source defect was found, and unrelated CI/classifier code has not been added to this PR. The official verdict has not accepted this head yet. |
|
For awareness: this overlaps with work that just landed on feat-cmux-next. #30020 makes The files don't overlap: this PR is the Swift Cmd-N path behind a toggle, and #30020 is the chat-start pick. The design is written up in Leo's Cloud design note, and the server-side version (binding, ownership, snapshots) is going into cmux-platform. Once the DEV builds switch over to cmux-platform, the client just asks the platform for its workspace's machine. If this PR lands, it may want to call that same path rather than keep its own pick. |
|
For awareness: this overlaps with related Cloud work. Nothing here asks you to change this PR.
|
|
A note on the Cloud route for new workspaces (
#30071 judges "the person's own run" by the run's own origin ( Follow-up (lead decision): a separate PR into |
































![Fix with [code]smith](https://pr-comments-assets.blacksmith.sh/codesmith/fix-with-codesmith-light-3x.png)
Fixes #26062
What
A Cloud toggle for cmux NEXT, function first (UI polish later):
cloud.newWorkspacesInCloud, off by default). It is a plain toggle setting, so it is also in the palette's Toggle Setting and incmux.json.cloud.newWorkspaceFolder):inherit(default) orempty.inherit: the git working copy around the focused terminal's or chat's folder is copied withcmux link sync push(the same transport Move to Cloud uses), under the machine's~/work. If the image refuses that folder it falls back to/root/work. The workspace's terminal opens in the person's folder on the machine, and the workspace takes the project's name.empty, or no folder, or a home folder (never copied): the workspace opens in the machine's own home, from the image's working snapshot.cmux workspace new), and any invocation that names--machine, keep their current behavior. Only a person's gesture follows the toggle.Research: how ChatGPT Work / Codex cloud run tasks
OpenAI documents Work's policy, not its mechanics. Its security page says Work "can reuse an environment across tasks or replace it while preserving eligible state" (Work cloud security). The concrete mechanics below come from Codex Cloud, the closest documented product:
inherit), or nothing is synced (empty).codex apply(git apply; fails cleanly on conflict) (CLI).cmux link sync pull, which reports conflicts) and the Cloud diff viewer (open PR #25696).plans/cmux-next/freestyle-parity.md.Gaps left for follow-ups:
Where the code lives
CmuxNextSettings/CloudNewWorkspaceSetting.swift: the two keys, their Settings rows (Machines page, "Cloud Workspaces"), privacy-refused for agents.CmuxNextCloud/Move/CloudNewWorkspacePlan.swift: the decision (person only; no--machine/command; never a home folder) and the folder copy overcmux link sync push, with the~/work→/root/workfallback.CmuxNextApp/Handlers/CloudHandlers+Account.swiftstartNewWorkspaceInCloud: runs the New Cloud Workspace flow with a new machine whose open copies the folder and creates the workspace with its terminal there.CloudMachineCreationkeeps that open so Retry repeats the copy.CloudVmHostStore(Foundation + CmuxNextCloud only) moves toCmuxNextCloudunchanged apart frompublic, App −74 source lines.Tests
CmuxNextAppTests/CloudNewWorkspaceTests: the decision against real cmux.json values and a real git folder on disk (off by default; on copies the whole working copy and opens the nested folder;empty; a home folder is never copied; scripts,--machineand a command are not rerouted; an app that can't copy starts empty), and the copy's work-root fallback, stop on a real refusal and the outdated-machine case, with a stand-in forcmux link sync push.CmuxNextSettingsTests/CloudNewWorkspaceSettingTests: parsing, defaults, the toggle on the Settings page and in the palette, agents refused.CloudVmHostTests,SettingsPageSectionsTests,SettingsSchemaExportTests.Observed / Not run
300826d8c0eb1fe660435d17(CmuxNext with test targets, app, cmux-tui: passed), then fleet stepa7db046948c6f3ca2395a28bon a gui-session-v1 worker (cmux8s-Mac-mini) in cmux's console session,CMUX_TEST_REQUIRE_GUI=1(a skip fails the step): CloudNewWorkspaceTests, CloudNewWorkspaceEntryTests, CloudNewWorkspaceLateStartTests, CloudNewWorkspaceSettingTests, CreationInputHoldTests and CmdNThenNewTerminalTabTests: all 6 suites passed, 30 tests, exit 0.a4e2b9b40ae45cd350bed6ee6faef01856cf6eed, normally merged with latest fetched basef06d9bd0736cc1af17a455eed1da63153ee7dead. GitHub reports MERGEABLE and zero unresolved review threads. The remote head was checked immediately before the plain push. Manual and hook prepush gates, the scoped web-lint wrapper, and syntax verification of all 18 changed Swift files passed. No builds or tests ran on the local Mac.4de25f3cff892ca14fe0b6e4compiled package/test targets and passed all 20 selected filters, with 153 reported Swift Testing tests and no failures (some filters overlap). This includes the Cloud/settings/late-reply coverage below plusCmdNThenNewTerminalTabTestsandCreationInputHoldTestsfor the incoming base integration. The job exited 0 and confirmed workspace cleanup.CloudNewWorkspaceEntryTestsatb62559281f5c250704627076f06bbbb789b47e58(fleet9f074c4e5cd57b551d01cafa) compiled and executed seven tests, failing only the four intended line-95 assertions for socket, app, agent and terminal callers claimingorigin=user; exit 1, cleanup confirmed. The same filter passed all seven tests and all four parameter cases on the current head. The repair uses the sharedActionInvocation.isPersonsOwnRunpredicate so these callers keep their requested route.WorkspaceCreation.create/firstTerminalpaths.CloudNewWorkspaceLateStartTestsexercises the actual stored toggle opener over the JSON-lines transport, requiring one workspace, one terminal, stable IDs across retry, and no cleanup close. Canonical red-before at969a0c69f0a54a157624e171b23313c3627fef79(fleet9965fe37e9fe81696e414ac8, exit 1, cleanup confirmed) executed one test and failed four intended assertions. It passed in the preceding 18-filter run and is selected again on the current head.4713e214e53f8a26b315dbf9ate0e3fac4670f41cadd10f05c89fef4e7226ec238compiled package/test targets and passed all 4 managed-preference and 6 schema-export tests, then returned artifact SHA-2569bb05acf2b62ec0dc2fa4bcf76dda10f00c78ea629c5bb82def61709aa0f8bc7. The unedited complete web reference was applied; the bot-owned defaults snapshot was excluded. The generation inputs are semantically unchanged at the current head. Independent byte and semantic audits confirm all 606 schema rows, 536 web-reference rows and 599 MDM properties from the current base are preserved, with only the two Cloud settings added. The four native exports also match the prior CI-generated artifact13065934303.cmux-tuisources fail onlibc::kill/libc::SIGKILLinmeta_save.rs:273. An unrelated branch reproduces both errors. Matching logs and base attribution. The defaults guard passed on attempt 3, accepting the exact-head SHIP receipt after its installation API permission lookup recovered from the rate limit.needs_review. No full strict localization audit is claimed.Focused commands, with exact failing and passing commit references where available above:
The 18-filter selection is
CloudNewWorkspaceLateStartTests,CreateTerminalLateStartTests,WorkspaceWithTerminalLateCreateTests,CloudNewWorkspaceTests,CloudNewWorkspaceEntryTests,CloudNewWorkspaceSettingTests,CloudWorkspaceSetupLifecycleTests,CloudSignedOutCreationContinuationTests,CloudVmHostTests,SettingsPageSectionsTests,CloudSignInRecoveryTests,CloudMachineChangeStateTests,CloudMachineChangesPollingTests,CloudStartChatMachineTests,AgentPaneCloudStartTests,AgentPaneNewChatsInSettingTests,ManagedPreferencesManifestTestsandSettingsSchemaExportTests.Not run: live signed-in Cloud creation/folder sync, a new tagged app, a current native capture, optimized Xcode Release compilation, or input-to-frame measurements. Package compilation does not establish optimized Xcode Release coverage. The historical capture below shows the toggle-off workspace view, not the new Settings rows or signed-in creation. No skipped test is claimed as coverage.
Performance
No perf numbers: verification covered opt-in Cloud workspace routing, generated settings, and late-reply correctness. Input-to-frame and live provisioning latency were not measured, so this PR makes no measured latency claim.
Changelog
Added: Run New Workspaces in Cloud (Settings > Machines) gives each new workspace its own Cloud machine, starting in a copy of your current folder or in an empty folder.
Capture
Existing real-app after image from
296d7f0115cc95695c5406e59cd3da3d4adbffff(core tour run); subsequent repair merged the base and refreshed generated exports. This image shows the default-off workspace view, not a signed-in Cloud create or the new Settings rows.Viewed after image: yes
Visual verdict: The captured default-off layout is clear enough to sit beside ChatGPT or Claude, with readable navigation and no clipped controls.
🤖 Generated with Claude Code
Need help on this PR? Tag
@codesmith-botwith what you need.