Repository navigation
Cloud start: copy again on the machine's new link after updating it - #31087
Merged
Merged
Conversation
A chat start whose copy the machine's older cmux-tui refused (machine_outdated) updates the machine and copies again. The update restarts the machine's daemon and its link comes back on a new socket, but the second copy reused the socket read before the update and failed: "cannot connect to .../cmux-link-....sock: No such file or directory (os error 2)" (capture at ff3f8c9, 2026-11-01). CloudOutdatedMachine.copy now reads the socket for each copy and, after an update, waits (up to 90 s) for the connection's handshake key to change before reading it again. CmuxNextApp shrinks by one line. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-3bab30503f0b9a7059e5
teamleaderleo
temporarily deployed
to
ci-routing-agent
November 1, 2026 15:38 — with
GitHub Actions
Inactive
Contributor
|
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)
Shipped in:
|
Collaborator
Author
|
Owned by an agent session · session |
teamleaderleo
temporarily deployed
to
ci-routing-agent
November 1, 2026 15:38 — with
GitHub Actions
Inactive
Collaborator
Author
|
Review (subagent claude-opus-5-5 medium): SHIP at 87bfa16 No blocking findings. Three follow-ups are filed as one issue. |
lawrencecchen
added a commit
that referenced
this pull request
Nov 1, 2026
…servable macro can name it (#31117) CmuxNext test compile at the feat tip 6dee40a (job 93d8d8e613bc7df8e78570b6): CloudStartChatMachineTests.swift:224:2: error: 'Link' is inaccessible due to 'private' protection level (in macro expansion @observable). The @observable macro emits an extension at file scope that names the type; a private nested class is not visible there. fileprivate keeps it out of every other file.
This branch was previously deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
When a machine's older cmux-tui refuses the folder copy (
machine_outdated), a Cloud chat start updates the machine and copies again. The update restarts the machine's daemon, so its link comes back on a new socket. The second copy still used the socket it read before the update, so it failed.Evidence
A DEV capture of build ff3f8c9 (cloud-proof integration, 2026-11-01) sent to a fresh machine, cloud-chats-2. The machine's daemon was upgraded at 15:26:27–33. Then the card failed with:
CloudStartChatreadmachine.daemon.connection?.endpoint?.socketPathonce, beforeCloudOutdatedMachine.copy.CloudMachineUpdates.updateNow→reconnectAfterUpdate→connect(dropTicket: true)creates a new link socket.Fix
CloudOutdatedMachine.copy(CmuxNextCloud) reads the socket for each copy.CloudWait.holds) for the connection's handshake key (CloudMachineUpdates.handshake) to change from its value before the update. Then it reads the socket again.app_lines -1).Overlap
#30655 (open, same lane family) changes the same
CloudOutdatedMachine.copycall inCloudStartChat.swift. Whichever lands second needs a small rebase there.Tests
CloudStartChatMachineTests.onlyTheMachinesOutdatedRefusalUpdatesItBeforeCopyingAgainnow also checks that the second copy uses the new socket.theCopyAfterAnUpdateWaitsForTheMachinesNewLink. The link drops during the update and comes back after it returns; the copy waits for it. It also checks that nothing copies while the machine is not connected.cmux-ci compile-check --appat the head.Agent session: agent session
🤖 Generated with Claude Code
Need help on this PR? Tag
@codesmith-botwith what you need.Summary by cubic
Fixes a chat start that copies a folder to a just-updated machine failing because it reused the machine's old link socket, which the daemon restart had removed.
The copy now reads the machine's socket for each attempt, and after an update waits up to 90 seconds for the connection's handshake key to change before copying again. A missing connection surfaces as a copy failure with Retry instead of silently succeeding.
Written for commit 87bfa16. Summary will update on new commits.