Repository navigation
cmux-tui: a creator's first chat on their own Cloud machine starts in its work folder with no question - #29556
Conversation
… its work folder with no question Leo: "whenever i start a chat it should be able to send me to cloud automatically". A new chat with no folder of the person's own starts in the workspace's first terminal folder, which on a fresh Cloud machine is $HOME: agent-session-start refused it (agent_session.home_unconfirmed, "needs a folder on that machine"). The work folder after it was refused too (agent_session.untrusted_folder): acpmux's auto-trust is off by default, so the machine's own ~/work asked. On the caller's own Cloud VM (the machine kind gate reads a Cloud VM, a team VM included, and the caller's vm_kind is exactly owner, the Cloud API's answer for the creator): - an unconfirmed home folder becomes the machine's work folder (made if missing); - acpmux's trust answer for exactly $HOME/work reads trusted (decided, auto cloud_work), at the start and in agent-session-trust's read, so the page asks nothing. A person's "Don't trust" and an agent's own untrusted level still win. Any other folder, a home folder the person chose, and any other machine or caller keep today's rules. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-3bab30503f0b9a7059e5
|
Owned by an agent session · session |
|
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:
|
|
Found 3 test failures on Blacksmith runners: Failures
|
…r an asking agent Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-3bab30503f0b9a7059e5
|
Review (codex, router-review): SHIP at 7a7a2ac 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 7a7a2ac
Rust tests were not run: no Rust toolchain is installed. Follow-ups:
|
…owner-first-chat-work-folder
…owner-first-chat-work-folder
Keep explicit folder-trust coverage in HOME/project, since the base now auto-trusts an owner's HOME/work (#29556). Verify the creator can start a chat on a team machine (#29107), including the machine session and store binding. Refuse missing owner answers on both plain and team hosts. Reproduced at 23adfaf via cmux-ci step 64a6dadbad022f88b748f474: scripts/ci/package-test-lane.sh suite Packages/macOS/CmuxNext CloudAgentChatTests,CloudLinkReconnectingTests,PlacementDocumentWriteOrderTests Cloud chat failed 3/4 due to these stale expectations; reconnect passed 5/5. Placement's pre-operation ordering assertion also fails independently. Scoped syntax, localization defaults, feature flags and namespace lint pass. The workspace package-group finding is unchanged base debt. Exact-head fleet verification follows the normal push; no local builds.
…agent on the VM (#25680) * test(next cloud): an ACP chat in a Cloud workspace runs its agent on the machine (#25583) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * test: frames collector off the main actor Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * test: a reconnected page reattaches to the machine's chat Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * test: the GUI's default first send in a Cloud workspace Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * test: prove the agent runs with the machine's environment; check the default folder Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * test: the machine's HOME is the agent's (acpmux passes no ACPMUX_HOME) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * test: the Cloud machine's link gives the owner answer a chat start needs (#26323) Since #26323 the app starts a chat on a Cloud machine only on the Cloud API's vmKind owner answer of the running link. The stand-in machine now runs a stand-in link whose attach answer says owner; a new case checks that with no owner answer no chat starts and the page says why. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * test(next cloud): an ACP chat in a Cloud workspace runs its agent on the machine (#25583) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * test: frames collector off the main actor Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * test: a reconnected page reattaches to the machine's chat Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * test: the GUI's default first send in a Cloud workspace Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * test: prove the agent runs with the machine's environment; check the default folder Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * test: the machine's HOME is the agent's (acpmux passes no ACPMUX_HOME) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * test: the Cloud machine's link gives the owner answer a chat start needs (#26323) Since #26323 the app starts a chat on a Cloud machine only on the Cloud API's vmKind owner answer of the running link. The stand-in machine now runs a stand-in link whose attach answer says owner; a new case checks that with no owner answer no chat starts and the page says why. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * test: the stand-in Cloud machine's daemon gates on the owner word; setup always cleans up Review fixes for the Cloud ACP chat tests: - the machine's daemon is told it is a Cloud machine of unknown kind (CMUX_AGENT_START_HOST=unknown-cloud), so a start and a trust answer run there only with the app's vm_kind owner; the no-owner-link case stays on a plain host so only the app can refuse it - the Cloud workspace's terminal starts in the machine's work folder, and the no-folder case checks the chat starts there - both daemons end with the test process (exitWithProcess), and every launch sits inside the cleanup scope; this Mac's acpmux home is shut down too - waits stop on cancellation; an unreadable acp ls answer is an issue, not an empty list; refusal text comes from AgentRemoteStartRefusal - the stand-in link outlives the 2-minute limit Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * test: isolate Cloud chat sidebar document ownership CloudAgentChatTests binds AppActions and awaits live daemon work, which changes process-wide SidebarDocStore.current. Hold the existing suite ownership gate so concurrent sidebar suites retain their document. Swift syntax and diff checks pass; focused fleet execution follows on the pushed head. * test: isolate Cloud chat harness startup Use private homes for both test machines and disable login-shell import, live catalog fetches and unrelated model probes, matching MachineCatalogAppFixture. Login import and catalog reload precede the first remote-start preflight, whose individual RPCs are bounded at five seconds. Fleet step 411470d1a2e191624d761bfc on 71e8a84 compiled all test targets, then CloudAgentChatTests failed 2/4 with agent_session.timeout before folder-trust refusal. Reconnect tests passed 5/5 and sidebar placement passed 1/1. The same focused Cloud command will be rerun through cmux-ci on this repair; no assertion or production timeout is changed. * test: report Cloud chat timeout context * test: follow current Cloud chat owner and folder rules Keep explicit folder-trust coverage in HOME/project, since the base now auto-trusts an owner's HOME/work (#29556). Verify the creator can start a chat on a team machine (#29107), including the machine session and store binding. Refuse missing owner answers on both plain and team hosts. Reproduced at 23adfaf via cmux-ci step 64a6dadbad022f88b748f474: scripts/ci/package-test-lane.sh suite Packages/macOS/CmuxNext CloudAgentChatTests,CloudLinkReconnectingTests,PlacementDocumentWriteOrderTests Cloud chat failed 3/4 due to these stale expectations; reconnect passed 5/5. Placement's pre-operation ordering assertion also fails independently. Scoped syntax, localization defaults, feature flags and namespace lint pass. The workspace package-group finding is unchanged base debt. Exact-head fleet verification follows the normal push; no local builds. --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: cmux-bot[bot] <348531757+cmux-bot[bot]@users.noreply.github.com>
…e red) (#30672) #30363 starts a Cloud chat with no folder in its own ~/chats/<chat id> and turned the feat base red with two tests, both a test fault, not the product's: - acpmux server::remote_guard::cloud_chat_tests::cloud_peer_uses_a_durable_chat_folder (added by #30363) gave cloud_chat_folder_under a home folder that did not exist. The product makes ~/chats with a non-recursive create under the machine's home folder, which always exists there; the test now makes its home first. - cmux-tui::cli agent_session_start::a_first_chat_on_the_callers_own_cloud_vm_starts_in_its_trusted_work_folder (#29556) still asked for the old ~/work start. It now checks the chat's own folder (renamed ..._starts_in_its_own_trusted_chat_folder), and its "Don't trust" case sets that folder untrusted, which still wins (owner_cloud_trust keeps a decision). Red: both fail alone at feat fe81446 (Linux steps d926abca, 9b561165, 04e50fb4; macOS c179ecce). Fix forward instead of the revert #30631: the product path is right on a real machine, only the tests lacked setup or asserted the old folder.
![Fix with [code]smith](https://pr-comments-assets.blacksmith.sh/codesmith/fix-with-codesmith-light-3x.png)
Leo: "whenever i start a chat it should be able to send me to cloud automatically".
What was wrong
Once #29107 and #29497 got a fresh Cloud machine past the team gate, the creator's first chat was still refused, in two steps.
remoteFolder).cmux cloud start-sessionopens a terminal on the machine first, and a first send in a machine workspace uses the same terminal folder. On a fresh machine that terminal sits in$HOME, soagent-session-startrefused it asagent_session.home_unconfirmed. The app reads that code as "needs a folder on that machine to start in". The nightly signed-in capture showed this on a fresh machine (hq run 41224623701).~/workwould be refused next withagent_session.untrusted_folder. acpmux's auto-trust is off by default (agents.trust.autoTrust), so nothing trusts it. Leo's VM reached this step after the owner gate.Neither step depends on the image: every image puts a fresh terminal in
$HOME.What changes
The changes are in cmux-tui (Rust), and they ship to machines through the app's own update of the machine's cmux-tui (#29497).
They apply only on the caller's own Cloud VM. That means the machine kind gate reads a Cloud VM (a team VM included) and the caller's
vm_kindis exactlyowner, the Cloud API's answer for the machine's creator.agent-session-start: a start in an unconfirmed home folder starts in the machine's work folder instead ($HOME/work, made if missing).$HOME/workreadstrusted, withdecidedandauto: "cloud_work", mirroring how acpmux answers a folder cmux made. This applies at the start and inagent-session-trust's read, so the app's page asks nothing either.untrustedlevel.Tests
a_first_chat_on_the_callers_own_cloud_vm_starts_in_its_trusted_work_folder(cmux-tuitests/cli/agent_session_start.rs):~/workanswerstrusted/cloud_work;$HOMEstarts, and makes~/work;untrusted_folder.~/workstill refuses.home_unconfirmedfor its home.Risk
This decides folder trust for one folder on one kind of machine: the work folder of the caller's own Cloud VM, which is a disposable sandbox the person owns. The daemon already lets any agent family run there (#28613). It records nothing in acpmux; the person's own answers still override it.
Agent session: agent session
🤖 Generated with Claude Code
Need help on this PR? Tag
@codesmith-botwith what you need.Summary by cubic
Fixes a creator's first chat on their own Cloud VM so it starts in the machine's work folder with no trust question.
On a fresh Cloud machine, a new chat with no folder of the person's own starts in the workspace's first terminal folder (
$HOME), whichagent-session-startrefused asagent_session.home_unconfirmed; the machine's own~/workwas refused next asagent_session.untrusted_folderbecause acpmux's auto-trust is off by default.Changes
$HOME/work, made if missing, and that folder readstrustedwithauto: "cloud_work"at start and in the trust page, so no question is asked.agent_session.not_asking).untrustedlevel still win.Written for commit e4f1815. Summary will update on new commits.