Files
cindy/apps/desktop/help-knowledge/remote.md
yan 4f061b3762 fix(desktop): 远端 MCP 代际失效补全 R21 五案
1. P1 bridge 重建恢复路径透传 Collab 闸门:此前恢复遍历的 ensure
   缺省 enabled, 用户禁用 Collab 后 bridge 重建会把刚清理的受管段
   重新注入回去。
2. P1 bridge shutdown 时远端 session 立刻失效:不再干等 lazy 重建
   (窗口期 send 持续 404/refused) — 远端 CC fresh 失效 + 无 turn
   query detach;远端 codex 逐 host stripRemoteCodexMcpConfig (无
   bridge 变体清理: 剥受管段 + 清 daemon env, 404 MCP 当场降级为
   无 MCP)。挂在 hook-control 插件变更与账号切换两处 shutdown。
3. P2 清理拆 forward 推迟到 bootstrap 生效后:修 R20-1 引入的回归
   — live turn defer 期间拆 forward 会让 turn 中的协同调用
   connection refused (daemon 内存 config 仍指该端口)。
4. P2 cc 注入 token 失效时返回 needsFreshStart:attach 回带旧
   Authorization header 的 alive query 会持续 401;factory 据此
   forceFresh (kill idle 旧 query 重建为无协同的干净 query)。
5. P2 help 文档同步:collaboration.md / remote.md 更新「远端会话
   可开协同、worker 同机执行」(此前仍写仅本地/远端不能当 lead),
   helpKnowledge.generated.ts 重新生成, guard PASS。

新增 6 个回归用例 (recovery 闸门透传 / needsFreshStart 两向 /
defer 不拆 forward / strip 清理与 live 跳过)。

Signed-off-by: yan <yan233@xd.com>
2026-07-29 10:01:31 +08:00

2.9 KiB

id, title, summary, tab
id title summary tab
remote Remote workspaces and device control Run agents on a remote machine over SSH, and let another signed-in device (e.g. your phone) control this desktop — both in Settings > Remote & device control. remote-control

Settings > Remote & device control has two parts: SSH remote workspaces (run an agent on another machine) and My Devices (let other devices you're signed into control this one).

SSH remote workspaces:

  • Add a host with the + button: give it an alias, hostname (IP or domain), user, port (default 22), and an auth method (SSH agent or a key file). Hosts from your ~/.ssh/config also show up automatically; you can re-read that file at any time.
  • Once a host connects (status dot turns green), expand it to:
    • Install the agents (Claude Code / Codex) on the remote machine, and run a quick test prompt against them.
    • Start a remote session — enter a working directory on the remote (defaults to ~); the app creates the directory if needed and opens a normal session whose agent runs on the remote machine with that remote working directory. It appears in your sidebar like any other session.
  • The agent-facing SSH tools (via the cindy-ssh plugin) reuse these same configured hosts — if a tool reports the host isn't found, add it here first.

My Devices (controlling this desktop from another device):

  • No manual pairing — any device signed into the same Cindy account is discovered automatically and appears in the list (this is how the phone app connects to your desktop).
  • The top card is this machine: rename it, see its relay-connection status, and toggle the master switch "allow other devices to control this machine".
  • Each other device has two independent switches: you control it (outbound) and allow it to control this machine (inbound). You can rename devices, and delete ones that are offline.

What a controlling device can and can't do:

  • A controlling device (like the phone app, which is control-only — it has no local agent or database of its own) can drive sessions: create / close / fork them, send and steer input, approve interaction prompts, switch model / effort / permission mode, rewind, manage collaboration workers and scheduled tasks, and read session / message lists.
  • It can not touch auth or API keys, change global settings, write the database directly, trigger updates, or run local shell / file dialogs on the controlled machine. A new remote session's working directory must be currently accessible on the controlled desktop; disconnected network drives are rejected.

Notes:

  • Remote project sessions can be the lead in a collaboration workflow — workers then run on the same remote host (see the Collaboration topic).
  • Device control works only between devices on the same account; the relay just routes between them — your session data isn't stored on it.