Skip to content

Cloud no-folder starts use fresh chat folders - #31186

Merged
teamleaderleo merged 1 commit into
feat-cmux-nextfrom
lane/cloud-home-fresh-chat
Nov 1, 2026
Merged

teamleaderleo merged 1 commit into
feat-cmux-nextfrom
lane/cloud-home-fresh-chat

Conversation

@teamleaderleo

@teamleaderleo teamleaderleo commented Nov 1, 2026 •

Copy link
Copy Markdown
Collaborator

A Cloud start with no folder could pass the machine's existing workspace folder into remote start, reopening a prior chat. This keeps the no-folder path folderless for Cloud owner links so the daemon allocates the fresh per-chat ~/chats/<chat-id> directory, while non-Cloud peers retain their workspace fallback.

Leo asked that “I want us to be able to do this too”: a no-project Cloud chat should start immediately in its own fresh chat.

Tests: AgentTabRemoteStartTests.aModernCloudDaemonReceivesNoFolderForRustToChoose covers a stale workspace folder and verifies no cwd is sent. python3 scripts/cmux-next/prepush-gate.py passes.

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

Fixes Cloud starts with no folder so they use a fresh chat directory instead of reopening a prior chat.

Previously, a Cloud start with no folder could pass the machine's existing workspace folder into the remote start. Now Cloud owner links stay folderless so the daemon allocates a fresh ~/chats/<chat-id> directory, while non-Cloud peers retain their workspace fallback.

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

View guided diff Turn on auto-fix

@github-actions

github-actions Bot commented Nov 1, 2026 •

Copy link
Copy Markdown
Contributor

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

Review ecafc24: 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=pr31186 -f ref=lane/cloud-home-fresh-chat -f platform=macos -f backend_mode=local

Shipped in:

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

blacksmith-sh Bot commented Nov 1, 2026 •

Copy link
Copy Markdown

Found 2 test failures on Blacksmith runners:

Failures

Test View Logs
test_runtime_added_app_capabilities_are_runtime_only (main.StaticCapabilityRuntimeO
nlyTests.test_runtime_added_app_capabilities_are_runtime_only)/
test_runtime_added_app_capabilities_are_runtime_only (main.StaticCapabilityRuntimeO
nlyTests.test_runtime_added_app_capabilities_are_runtime_only)
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.

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Review (subagent claude-opus-5-5 medium): SHIP at ecafc24

A Cloud start with no folder (ownerLink set) no longer falls back to the workspace's earlier remote folder, so the daemon makes a fresh ~/chats/ instead of reopening the previous chat. Restored tabs and session links exit earlier and are unaffected, folder starts still win, non-Cloud hosts keep the fallback, and idempotency is unchanged. The test fails on base. CmuxNextApp +1/-1.

Follow-ups:

  • A Cloud daemon without supportsNoCwd now gets its listed work folder instead of the workspace folder (harmless, but a behaviour change).
  • Add a test that a non-Cloud start (ownerLink nil) still uses remoteFolder.

@teamleaderleo
teamleaderleo merged commit 796b77a into feat-cmux-next Nov 1, 2026
162 of 176 checks passed
@teamleaderleo
teamleaderleo deleted the lane/cloud-home-fresh-chat branch November 1, 2026 18:07
lawrencecchen added a commit that referenced this pull request Nov 3, 2026
… starts in a fresh ~/chats folder there (#33096)

aFirstSendWithNoFolderStartsInTheWorkspacesFolderOnTheMachine failed at
CloudAgentChatTests.swift:92/94: the first send came back with a session,
not agent_session.untrusted_folder. #31186 (796b77a) changed the
product on purpose (Leo: a no-project Cloud chat starts at once in its own
fresh chat): on a Cloud owner link the app sends no folder
(AgentTabs+RemoteStart.swift:68), and the machine's daemon makes
~/chats/<chat> there (acpmux remote_guard cloud_chat_folder), which needs
no trust question. #31186 updated the unit test
(AgentTabRemoteStartTests.aModernCloudDaemonReceivesNoFolderForRustToChoose)
but not this live two-daemon test, which still asked for the old
workspace-folder start.

The test now states the new contract end to end, with real daemons: the
first send starts the chat with no error; the session runs in the machine's
acpmux; its folder, as 'cmux acp --json ls' lists it, is under the
machine's HOME/chats/, exists, and is not the workspace's folder; the
machine's store binds the session to the tab. The explicit-folder trust
path stays covered by aNewChatInACloudWorkspaceRunsItsAgentOnTheMachine.

Culprit: 796b77a (#31186).
Red: fleet job 2bf90b6c18ca136f3fb6c15d at feat 11dfe91.

This branch was previously deployed

1 inactive deployment
ci-routing-agent — ecafc243 Deployed Nov 1, 2026 by teamleaderleo via namespace autofix #11517
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