Cloud: at the machine cap, pause an idle machine or offer Pause one / Upgrade / Run on This Mac
Leo, on a Cloud create past the plan's machine cap: "you try to create a new workspace/machine past the cap, what do we wanna do? reuse existing or ask upgrade or"
Today a person's create at the cap dead-ends on an upgrade card (CloudMachineCreateFlow.gate returned .upgrade(.atLimit)). Now:
- Make room automatically (app-server link): cmux-platform pauses the person's least recently used idle machine (no open session, nothing for 10 minutes) and creates (manaflow-ai/cmux-platform#562, merged). The app says one line: "Paused 's machine to make room". The paused machine stops counting and resumes when its workspace opens.
- Only if every machine of theirs is busy: one card,
CloudMachineCapCard, with Pause for each busy machine (its last activity on a line), Upgrade (the existing paid-plan path), and Run on This Mac. Pause pauses that machine and creates again with a new key; Run on This Mac sends the chat's kept prompt to this Mac (run_on_this_mac, webviewscloudRun.ts). - Never reuses another workspace's machine (one workspace per machine), never pauses a teammate's.
- A free plan keeps the upgrade card's text, plus Run on This Mac.
- An agent's create gets no card and reports the refusal, as before.
The classic /api/vm link makes no room itself (it gets no new features before the DEV cutover); it shows the same card with the person's own running machines.
Where: the policy is CmuxNextCloud/API/CloudMachineCap.swift, the card CmuxNextCloudUI/CloudMachineCapCard.swift (11 strings, every app locale). The Rust cloud app server keeps made_room on the create answer and the busy list on the refusal (ops/machine.rs). CmuxNextApp's physical lines do not rise (+39/-39): the upgrade prompt case and its sidebar card are gone.
Tests: CloudMachineCapTests (Pause then create again with a new key; Run on This Mac, Upgrade and Not now create nothing more; an agent gets no card; only the person's own running machines), CloudMachineCapCardTests, CloudCreateWithoutAskingTests (the gate lets the app-server link's cap through), cloud_wire.rs (made_room and details.busy survive the app server), cloudRun.test.ts. The server side's red/green ("at the cap with an idle machine, pauses it and creates") is in manaflow-ai/cmux-platform#562: red on its base, green on its head.
Design: leo-workspace design/cloud.md, "At the machine cap".
Agent session: agent session
🤖 Generated with Claude Code
![Autofix with [code]smith](https://pr-comments-assets.blacksmith.sh/codesmith/autofix-with-codesmith-dark-3x.png)
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.
Summary by cubic
A Cloud create at the plan's machine cap no longer dead-ends on an upgrade card. On the app-server link, cmux-platform pauses the least recently used idle machine and creates; the app shows "Paused 's machine to make room". When every machine is busy, a single card offers Pause (each busy machine), Upgrade, or Run on This Mac, which sends the kept prompt to this Mac instead. The classic /api/vm link makes no room itself and shows the same card with the person's own running machines. A free plan keeps the upgrade card plus Run on This Mac; agents report the refusal without a card.
- The cloud app server keeps
made_roomon the create answer and the busy list on the refusal. - Policy logic lives in
CmuxNextCloud(CloudMachineCap) and the card inCmuxNextCloudUI(CloudMachineCapCard), with the strings translated in every app locale.