Skip to content

fix(cloud): resume New Cloud Machine after sign-in once - #27104

Merged
teamleaderleo merged 18 commits into
feat-cmux-nextfrom
cloud-setup-resume-create
Oct 30, 2026
Merged

teamleaderleo merged 18 commits into
feat-cmux-nextfrom
cloud-setup-resume-create

Conversation

@teamleaderleo

@teamleaderleo teamleaderleo commented Oct 28, 2026 •

Copy link
Copy Markdown
Collaborator

Clicking New Cloud Machine while signed out now keeps the original creation request and destination through hosted sign-in. A successful sign-in continues once into the existing workspace wizard or requested-machine flow. Replacing the pending request, cancelling sign-in, signing out, changing account scope, closing its window, or disabling Cloud prevents stale creation.

The native action owns this handoff for the Computer menu, Add Device, and command palette. Standalone sign-in fallbacks in the agent pane and Add Device are removed so a refused action cannot silently discard the creation intent. Nonperson callers still receive the signed-out refusal.

This supersedes the native continuation portion of #24837, which predates the workspace wizard and allows multiple waiters on one browser-auth attempt to resume creation. Its CLI auto-open changes remain separate.

Requested behavior: “person-initiated sign-in then resume exact newCloudMachine once (cancel/replacement safe).”

The pending continuation has one generation; the action registry owns the sign-in work and records its network wait and failure. Replacement, sign-out, and policy teardown invalidate it; auth completion consumes it before invoking creation. The hosted sign-in attempt owns its existing timeout and cancellation.

Validation

  • Exact head 101aab62316d43ca06958746aed3e05ce9b02ac4: cmux-ci step 71597d472155a75226ce8cdf finished with exit 0 on the native fleet.
  • CloudSignedOutCreationContinuationTests and CloudWorkspaceSetupLifecycleTests: 19 tests passed across the two suites.
  • AgentPaneConnectActionTests: 7 tests passed. Total: 26 test executions across the three filters; the account replacement test covers four cases.
  • git diff --check and prepush-gate.py pass; the gate reports only the existing app-size warning. No live browser sign-in was performed; the handoff is exercised through controlled native continuations and the actual action registry.
    No capture: native action continuation and tests only; existing sign-in and workspace wizard presentations are reused.

Changelog

Fixed: New Cloud Machine continues after sign-in without requiring another click or replaying a superseded request.

Agent session: agent session


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


Summary by cubic

Clicking New Cloud Machine while signed out now holds the original request and resumes creation once after hosted sign-in succeeds, instead of discarding the intent or requiring another click.

  • The native action runs through the action registry's effect lifecycle; ActionTrackedWork preserves deferred work and result tasks across the sign-in handoff, so post-auth outcomes surface through the registry.
  • Interactive runs keep their normal failure notice, while CLI callers still capture refusals in their action result.
  • The chat the request came from is captured when the action runs, since sign-in may finish after focus moved.
  • The sign-in's own user-and-team hydration is allowed to finish; account or team change, stale team restoration, request replacement, sign-in cancellation, sign-out, closing the origin window, or disabling Cloud invalidates the pending creation.
  • The continuation uses one generation, so a late sign-in result from a superseded attempt can never resume creation.
  • Nonperson callers (for example, agents) still receive the signed-out refusal.

Migration

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

View guided diff Turn on auto-fix

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Bead cx-vlw5r8 created for this PR by the cmux coordinator.

@github-actions

github-actions Bot commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

Default changes

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

  • tunable-source.CmuxNextApp/Handlers/CloudHandlers.swift:bind: "bef2994372d16b669a0bef336a852f6b46fff9abd6c646f12dd81d91e205144d" -> "d14a651a72141973d74ef347b3e25e4226d1a6edc2e48c5dd0785519d246dfd8"

Needs a review. It passes with an independent review receipt on this commit: a comment or review whose first line is Review (<reviewer>): SHIP at ac6d357ca9329fae798c641e69d7fc8c79ef06f5, from a member, not a self-review (the newest verdict naming the head decides; a later BLOCK beats an earlier SHIP), or with an approving review on this commit from @lawrencecchen or @austinywang (the call owners in .github/defaults-call-owners.json, never the author). A receipt posted as a review re-runs this check; after a plain comment, re-run it. The needs a call label alone does not pass, and a new push needs a new receipt.

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

@github-actions github-actions Bot added the risk:high Risk tier (docs/ci/risk-tiers.md) label Oct 28, 2026
@blacksmith-sh

blacksmith-sh Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

Found 10 test failures on Blacksmith runners:

Failures

Test View Logs
--from must install a complete prebuilt tree/
--from must install a complete prebuilt tree
View Logs
/tmp/tmplxjo2pjs/summary-fail.json (live):/summary-fail.json (live): View Logs
/tmp/tmprdl9xeqa/summary-missing.json (live):/summary-missing.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
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
test_the_repository_highlights_validate (main.DigestTests.test_the_repository_highl
ights_validate)/
test_the_repository_highlights_validate (main.DigestTests.test_the_repository_highl
ights_validate)
View Logs

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

@github-actions

github-actions Bot commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

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

Review ac6d357: 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=pr27104 -f ref=cloud-setup-resume-create -f platform=macos -f backend_mode=local

red: cmux-next checks (god files, concurrency, crash safety, l10n); NEW: red check: Prebuilt web bundles install and stamp (+2 more) is not red on the base 6c1a984; do not merge until green; see lane-rules

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Owned by an agent session · session

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Review (codex gpt-6-astra high, fast, via review-router): SHIP at 101aab6

No P1/P2 correctness, regression, security or test coverage findings.

Fleet suites at this head: cmux-ci step 71597d472155a75226ce8cdf (CloudSignedOutCreationContinuationTests, CloudWorkspaceSetupLifecycleTests, AgentPaneConnectActionTests) exit 0.

@teamleaderleo
teamleaderleo marked this pull request as ready for review October 30, 2026 01:46
Resolves conflicts with #26740 and #26568: keep the palette actions, keep
this PR's removal of the agent pane's sign-in fallback, and pass #26740's
chat pick into bindMachineCreation (read when the action runs, since sign-in
may finish after focus moved).

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

Copy link
Copy Markdown
Collaborator Author

Review (codex gpt-6-astra high, fast, via review-router): SHIP at ac6d357

No P1 or P2 findings. This head merges feat-cmux-next (which has #27758, #27862, #26740 and #26568). The conflict resolution keeps the palette actions, keeps this PR's removal of the agent pane's sign-in fallback, and passes #26740's chat pick into bindMachineCreation.

@teamleaderleo
teamleaderleo merged commit ae7c57b into feat-cmux-next Oct 30, 2026
155 of 166 checks passed
@teamleaderleo
teamleaderleo deleted the cloud-setup-resume-create branch October 30, 2026 05:16
@github-actions

github-actions Bot commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

lawrencecchen added a commit that referenced this pull request Oct 30, 2026
The slice head 2b2fc8e (= 43037147a0b's tree: slice + trunk sync c09bb74) merges the feat tip, 130 new
commits. 58 files conflicted:
- 0 reuse the previous round's resolutions: this round's base is the previous feat tip a14725a, so no hunk had
  all three sides equal to 5f39f9e's inputs.
- Regenerated, not hand-merged: the 4 CmuxMessagesLab patches (Fixture, Layout, RowDrawing, WindowView) from the
  merged vendored sources against the pinned upstream reconstructed from the side whose patch was consistent (feat's
  for 3, perf's for WindowView; feat 65de604 edited WindowView.swift without rewriting its patch).
- 54 resolved by porting feat's change into perf's shape:
  - Package.swift (CmuxNext: Floating tests get CmuxNextDesign with perf's Wakeups deps; CmuxMobileKit: Model gets
    feat's Resources with perf's CmuxSafeConcurrency).
  - Lineage parents #24136: SidebarSessionTreeFeed (recordedParents and per-host links on perf's ServiceObservation),
    RemoteAcpmuxWire (host/linksAlias notes posted on perf's mainWork; test-only inits take them too),
    AgentTabRemoteHost, AgentTabs+Wiring, AgentSessionWorkspace (the record is one completion task on main), tests.
  - Artifact sandbox #26216: perf's page-host PageArtifactFrame already serves the sandboxed endpoint; feat's
    navigation tests ported to PageNavigation, frame-ancestors expectation added, artifactFrameURL keeps only the
    page host, webviews tests on perf's URLs.
  - pane.commandAvailability (#25405) and chief.face (#27914) beside perf's keyToPaint and Wiring init.
  - State files off main #27749: AgentUnsentDrafts (perf's ObservedMap) and ScrollAnchors (blockingDecode) on
    AgentPaneStateFile.
  - AgentPaneTransport.close: perf's close reason plus feat's host-request failure and trust reset.
  - CloudService: perf's file, plus #27104 signedOutCreation (scope, policy, stop, signOut in +Machines) and #26740
    autosize/sizePick; listIsCurrent moved to +AppServer as feat did.
  - debug.object_menu into perf's DebugDriverControl; Home fixture presence/faces beside perf's field.
  - Palette overlay window #26951 into perf's paletteBuilt.
  - Per-window Home #27880 in perf's dockTab helper; active team (1bb1b96) on perf's cloudAuth.
  - Busy refusal (a930474, 2a9b813) in perf's LineTransport split (+State, +Route, framed write).
  - Launch snapshot sidebar doc (dc38061): DaemonLaunchSnapshot.sidebarDoc, shown once settled
    (whenSettled), its connect follow a ServiceObservation; the Rust test moved to launch_snapshot_tests.rs.
  - Hover card corners (bc66475) with perf's interactive flag; Chief pet state (#25671) on perf's
    ServiceObservation and AppearanceSignals; Chief picture crop (#27933) on perf's lanes and optional store;
    Home presence (#25578) as a FrameObservation; sidebar tab look (#27530) via SidebarLookFollower; settleOpenings
    (#24374) with perf's snap; Omnibar imports.
  - acpmux: inbox digest senders without slicing; withdraw_queued async with from_agents_only; cmux-tui-core and
    platform: connection leases beside perf's modules and InlineSocket (bounded_outbound.rs takes back the
    `platform::transport` import perf had dropped, which feat's claim_watched_connection names).
  - webviews: App/NewTab/NewTabScreen (retry, slash commands, at), settings keys moved to cardRows.ts.
- Feat's tests that call perf-changed inits fixed: TabConcentricCornerTests (input:), HomeChatPresenceFacesTests
  (deadlines:, frame delivery), RemoteChildSessionsTests (main run loop for posted notes).

Generators: cargo metadata in cmux-tui, cmux-tui/fuzz, Native/DiffSidecar and optchat-chief changed no lock;
gen-features.py --check, gen-chromium-host-wire.py --check and --check-ops, sync-resource-api.py --check pass.
webviews: bun run check passes. schemas/settings/settings-schema.json stays perf's (generated; the autofix
regenerates it): until then feat's chiefLook.test.tsx misses the home.bubbleColors rows.
teamleaderleo added a commit that referenced this pull request Oct 30, 2026
#27104 added `public enum ActionTrackedWork` with an all-static public
surface, which the package-conventions namespace-type rule refuses, so
the cmux-next convention lint has been red on feat-cmux-next since
ae7c57b. Its only member took the registry as its first argument, so
it becomes what the lint asks for: an extension on the receiver type.
`ActionTrackedWork.effect(registry: r, ...)` is now
`r.trackedWorkEffect(...)`, with the same body and the same strong capture
of the registry. No behavior changes.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
cmux-bot Bot added a commit that referenced this pull request Oct 31, 2026
* fix(cloud): signed-out Cloud actions sign in, then run

HQ #4884 finding 2: every Cloud action but New Cloud Machine was greyed
out with "run Sign In from the command palette" and no way to act. A
person's run (palette, menu, context menu, key) of an action whose only
reason is "signed out" now signs in and then runs it, through the same
one-pending-replay continuation New Cloud Machine uses (#27104). The CLI,
MCP, scripts and pages keep the reason and are refused as before.

The registry gains ActionRecovery: a way past an unavailable reason that
only a person's gesture takes. The palette keeps such a row enabled with
a note that says running it signs in first; menus validate it as enabled.

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

* fix(actions): recovery rows keep the key-equivalent gate; shortcuts reach recovery

Review at fff7a59: a recoverable menu row returned before the
menuKeyEquivalentGate, so a key the router gave elsewhere could start a
sign-in. It now goes through the gate like any enabled row. Key binding
resolution (RegistryKeyBindings.canPerform) also counts a recoverable
action as runnable, so a shortcut such as New Cloud Workspace's reaches
the sign-in.

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

* fix(actions): a recoverable context menu row shows the recovery note

Review follow-up at a2fbb3d: ActionTargetTitles.decorate showed the
stale "run Sign In from the command palette" reason on a row that is now
enabled; it shows what the click does instead.

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

* capture(cloud): a signed-out Cloud actions state for before/after stills

scripts/cmux-next/media/states/cloud-signed-out-actions.json: the palette's
Open Desktop row and a fixture Cloud machine's right-click menu while
signed out, the menu left open for the still. debug.cloud_machine_fixture
gains `backend: true` (DEBUG only): Cloud reads as reachable in a capture
build that has no Cloud backend, so the rows show the signed-out reason a
person's build shows instead of "This build has no Cloud backend".

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

* fix(cloud): a recovered Cloud action waits for the machine list before it runs

Review follow-up (P1) at a92b55e: after sign-in the machine list loads
asynchronously, so Open Desktop or SSH replayed at once found no machine.
The sign-in step now also loads the list (refresh ifOlderThan 30 s) before
the replay.

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

* fix(cloud): the recovery reads a current machine list, not a recently started one

Review follow-up (P1) at 1a70d1f: refresh(ifOlderThan:) returned at once
while another read was in flight or after an account switch dropped the
list. The recovery now reads unless the store holds a list for this
account from the last 30 s.

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

* fix(cloud): a recovery whose list read was superseded reads once more

Review follow-up (P1) at aa2a733: the sign-in's own refresh could
supersede the recovery's read, which then returned false with the list
still pending.

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

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: cmux-bot[bot] <348531757+cmux-bot[bot]@users.noreply.github.com>

This branch was previously deployed

1 inactive deployment
ci-routing-agent — ac6d357c Deployed Oct 30, 2026 by teamleaderleo via wait for same-key tree publisher #80454
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant