Skip to content

Cloud cap card: Pause frees a slot (CloudDO pause on the app-server link; classic Pause only where it frees room) - #32866

Merged
cmux-bot[bot] merged 2 commits into
feat-cmux-nextfrom
cloud-cap-pause-slot
Nov 3, 2026
Merged

cmux-bot[bot] merged 2 commits into
feat-cmux-nextfrom
cloud-cap-pause-slot

Conversation

@teamleaderleo

@teamleaderleo teamleaderleo commented Nov 3, 2026 •

Copy link
Copy Markdown
Collaborator

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 exisitng or ask upgrade or". The card #32679 shipped (Pause one / Upgrade / Run on This Mac) has two gaps; this fixes both. Fixes #32708, fixes #32710.

#32708, app-server link. The cap card's Pause, and the sidebar's Pause and Resume, called the classic /api/vm/{id}/pause, which cannot pause a CloudDO machine. On the app-server link CloudService.pauseMachine / resumeMachine now send cloud.machine.pause / cloud.machine.start through the app server (CloudMachinePower, CmuxNextCloud). CloudDO already answers a person's pause only once the provider call landed (CloudCore submitAs, its 25 s wait), so the slot is free when the card's create goes again. A pause longer than that wait answers mutation.indeterminate; it is asked again with the same key (it joins the call in flight), at most 3 times. No backend change is needed: the Mac relay's install may pause without an approval (cmux-platform domain/Cloud.ts authorize), and the Rust app server already declares mutation.indeterminate for pause.

#32710, classic link. The classic allowance counts paused machines (web/services/vms/repository.ts activeLimitExceededInTx, LIVE_VM_RESOURCE_STATUSES), so a Pause there frees nothing. The classic card now offers Pause only for the shared vCPU/memory pool refusal (vm_resource_pool_exceeded, activePoolUsage counts provisioning and running only), mapped to a new CloudUpgradeReason.pool; the allowance refusal and the local plan gate keep Upgrade and Run on This Mac. Classic's backend is untouched.

CmuxNextApp lines do not rise (in-place edits only).

Tests: CloudMachineCapTests (the classic card offers Pause only where pausing frees room; the app-server pause sends cloud.machine.pause with one key and origin user, retries indeterminate up to 3 calls, stops at once on any other error), CloudCreateWithoutAskingTests (a 402 vm_resource_pool_exceeded throws .pool).

Design: leo-workspace design/cloud.md, "At the machine cap".

Agent session: agent session

🤖 Generated with Claude Code


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


Summary by cubic

Fixes two gaps in the Cloud cap card's Pause so that pausing actually frees a slot before the create retries (cmux#32708, cmux#32710).

Bug Fixes

  • On the app-server link, Pause and Resume now send cloud.machine.pause / cloud.machine.start through the app server, since the classic /api/vm cannot pause a CloudDO machine.
  • CloudDO answers once the provider call lands, so the slot is free on retry; a pause longer than CloudDO's wait answers mutation.indeterminate and is retried with the same key, up to 3 times.
  • On the classic link, Pause is now offered only for the vCPU/memory pool refusal (vm_resource_pool_exceeded), which counts running machines alone; the allowance counts paused machines, so its refusal keeps Upgrade and Run on This Mac.
  • No backend changes are needed.

Written for commit a1ab06d. Summary will update on new commits.

View guided diff Turn on auto-fix

…assic offers Pause only where it frees room

cmux#32708: the app-server link's Pause (the cap card's and the sidebar's) sent the classic /api/vm/{id}/pause,
which cannot pause a CloudDO machine. It now sends cloud.machine.pause (and Resume cloud.machine.start) through
the app server. CloudDO answers once the provider paused it, so the slot is free when the create goes again; a
pause longer than its wait (mutation.indeterminate) is asked again with the same key, at most 3 times.

cmux#32710: the classic allowance counts paused machines (web/services/vms/repository.ts), so a Pause there frees
nothing. The classic card offers Pause only for the vCPU/memory pool refusal (vm_resource_pool_exceeded), which
counts running machines alone; the allowance refusal keeps Upgrade and Run on This Mac.

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

github-actions Bot commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

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

Review a1ab06d: 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=pr32866 -f ref=cloud-cap-pause-slot -f platform=macos -f backend_mode=local

web and size checks: green

Shipped in:

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

Copy link
Copy Markdown
Collaborator Author

Owned by an agent session · session

@blacksmith-sh

blacksmith-sh Bot commented Nov 3, 2026

Copy link
Copy Markdown

Found 7 test failures on Blacksmith runners:

Failures

Test View Logs
/tmp/tmpk91etvoo/summary-missing.json (live):/summary-missing.json (live): View Logs
/tmp/tmpt0po0e4l/summary-fail.json (live):/summary-fail.json (live): View Logs
[new_workspaces] debug.new_workspace timed 0 of 50 new workspace rows/
[new_workspaces] debug.new_workspace timed 0 of 50 new workspace rows
View Logs
[new_workspaces] the window draws no frames/[new_workspaces] the window draws no frames View Logs
[tabs] debug.tab_switch timed 0 of 40 switches/
[tabs] debug.tab_switch timed 0 of 40 switches
View Logs
[tabs] the window draws no frames/[tabs] the window draws no frames View Logs
convention violations found (ERROR lines above)./
convention violations found (ERROR lines above).
View Logs

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

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Review (codex, router-review): SHIP at 13b0385

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

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

SHIP at 13b0385
Visual verdict: no images; Leo tries the build

  1. [P2] [follow-up] Packages/macOS/CmuxNext/Sources/CmuxNextApp/Cloud/CloudService.swift:771: Add screenshots of the classic pool and allowance cap cards to verify the changed Pause availability.

No correctness findings. Swift tests could not run because this box lacks a Swift toolchain.

Follow-ups:

@cmux-bot cmux-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cmux-bot approves 13b0385: an independent review passed this exact head (router-review receipt by teamleaderleo). A push needs a new review; a later BLOCK at this head dismisses this approval.

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

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

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

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

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

No correctness regressions found in backend contracts, error handling, or retry paths. Swift tests could not run: no Swift toolchain is installed.

  1. [P2] [follow-up] CloudService.swift:771: Provide screenshots covering the classic allowance card without Pause and pool card with Pause to verify changed button visibility.

Follow-ups:

@cmux-bot cmux-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cmux-bot approves a1ab06d: an independent review passed this exact head (router-review receipt by teamleaderleo). A push needs a new review; a later BLOCK at this head dismisses this approval.

Copy link
Copy Markdown
Collaborator Author

HQ brief 09 follow-up, checked against feat-cmux-next@6c3fe3648ba4b44e7bf38c4982a665ec2d5d5712: this merged PR resolved app-server pause/resume; thank you. The remaining lifecycle gaps are now tracked with separate ownership: draft #34096 changes CloudDO rename/idle-policy routes and adds source tests; issue #34099 covers delete via G8 human approval, same-key retries and tombstone semantics. Related upstream platform #696 addresses shared-team policy mismatch. Source-level findings only; no live Cloud machine acted on. This comment supersedes the pre-#32866 portion of the earlier HQ 09 finding.

This branch was previously deployed

1 inactive deployment
ci-routing-agent — a1ab06d8 Deployed Nov 3, 2026 by teamleaderleo via cmux-tui tree preflight #103582
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