Done

Remote-SSH agents spawned via agents_spawn come back empty after restart; useWorktree path is local, not remote

From BastiFastiDone 2 days agovia agent-mcp

On a Windows desktop whose projects run via Remote-SSH on a Linux host, agents spawned by the personal assistant with agents_spawn open in the Windows app and run on the remote host.

  1. After the app restarts, reopening such an agent shows "No conversation found with session ID …": the resume looks for the session where it does not exist, so the tab comes back empty and the earlier conversation is lost.
  2. With useWorktree: true, the worktree path is created from the local Windows checkout, but the remote shell runs cd /home/<user>/…/.worktrees/<branch>, which does not exist ("No such file or directory"). The agent never starts, while the spawn still reports success.
  3. agents_close on these runs answers unknown agentId, although agents_spawned_list still lists them (state starting/exited/done). The assistant cannot clean them up.

Expected: resume finds the remote session; worktrees are created on the host where the agent runs (or useWorktree is refused for remote projects); agents_close works for every run agents_spawned_list returns.

AgentsRoom diagnostics

  • App version: 1.223.0
  • OS: win32 10.0.26300 (x64)
  • Agent CLI: claude
  • App language: system

Expected behavior

Spawned remote agents keep their conversation across an app restart, worktrees exist on the remote host, and agents_close can close any run listed by agents_spawned_list.

Actual behavior

After restart: 'No conversation found with session ID'. With useWorktree: remote cd into a non-existent .worktrees path, then 'Connection closed', no work done. agents_close: 'unknown agentId' for runs still listed by agents_spawned_list.

Steps to reproduce

  1. Windows desktop, project configured with Remote-SSH to a Linux host. 2) From the personal assistant call agents_spawn({project, useWorktree:true, worktreeBranch}) -> agent never starts (cd fails). 3) agents_spawn without worktree, let it finish, restart the desktop app, reopen the tab -> 'No conversation found'. 4) agents_close(agentId) on a run from agents_spawned_list -> 'unknown agentId'.

Version or build

Desktop 1.221.1 (Linux host), Windows desktop current; Claude Code 2.1.303

Replies

The team2 days ago

Thanks for the detailed report, all three points are fixed and will be available in the next version.

  1. Conversation lost after a restart: when you clicked Resume on the "previous session" card, the app briefly saved the id of the new, still empty console in place of your real conversation, and the resume then looked for that empty one on the server. When the server could not be checked in the background (common on Windows with a password connection), nothing caught the mistake. Resume now always reopens the conversation the card offers.
  2. Worktrees: on a project whose code is on your computer but whose agents run on a server, a worktree was created on your computer, where the server cannot see it. Such a request is now refused with a clear explanation (the agent can still be started in the project folder on the server), and a "new worktree per agent" profile falls back to the project folder instead of leaving the agent unable to start. Projects opened directly on the server keep their worktrees on the server.
  3. agents_close: it only looked for the agent in the assistant's own space, while the agents it had started live in your project. It now finds every agent the assistant started, wherever it runs.

If one of these still happens after the update, please reopen this ticket with as much detail as possible (a screenshot or a short video helps a lot).

Up to 3 images, or paste one straight from your clipboard. Big screenshots are shrunk in your browser before they are sent.

Sent automatically with your message

Your browser sent this along so the team can reproduce what you saw. Nothing here was typed by you.

Browser
AgentsRoom-MCP/1.223.0 (win32 x64)