cmux NEXT composer: /cd moves the chat to another folder

Merged
TE
5d ago
+123-13

Leo-ask: ask-3f52ca677f

Lawrence asked, and Leo forwarded on 2026-10-24: "/status to show ... for all the harnesses", "/cd as well", "look at all the / commands that claude and codex have and support all", plus "fast picker weird". Leo: "1 the fast situation we may alr have it fixed / 2 we may alr have stuff but status rendered well might be nice".

Already on feat-cmux-next:

  • /status, rendered for every harness: the Session status card (11c3f51b9054, 2026-10-23), with usage limits since #27762. It shows version, session, folder, machine, model, effort, sign-in source, route, setting sources, context and usage limits, with Copy all.
  • Fast: the separate Fast dropdown is gone. Fast mode is in the model picker (#26555), on every tab including Codex (#29664), and /fast toggles it (#24587).

This PR adds the missing piece, /cd:

  • /cd <folder> takes an absolute path or one relative to the chat's folder (.., ./src, src; . and .. resolved, quotes stripped).
  • It works the same way as picking a folder from the composer's folder chip (chooseProject). A chat with no turn yet starts in that folder. A started chat keeps its folder and opens a new chat there, because an ACP session's folder is set when the session starts.
  • /cd with no folder opens the folder browser (project.browse).
  • It is refused inline when the host says the path is not a folder (" is not a folder."), for ~ paths and for relative paths with no chat folder (asks for a full path), and on New Tab, which picks its folder with its own project menu.
  • It is not offered in quick chats.

Changelog

  • Added: /cd <folder> in the agent chat composer moves the chat to another folder.

Observed / Not run

  • Ran on the PR head, from webviews/: bun test on cmuxCommands.test.ts, test/cmux-command-dispatch.test.ts, test/cmux-command-btw.test.ts, test/composer-return-sends.test.tsx, newtab/actionRows.test.ts and HomeLists.test.ts: 38 pass. bunx tsc --noEmit: clean except test/latency/probe.ts (interactionId), a file this PR does not touch. scripts/web-lint.sh: passed. The type-aware lint runs in CI.
  • Not run: a DEV build. iOS parity (cmux-next-ios/verify/parity-mac.md) is a follow-up.

risk: normal. No capture: CI's gallery run covers this composer surface.

Agent session: agent session

šŸ¤– Generated with Claude Code