Repository navigation
Agent suggestions
Public previewDescription
Feature request
Add a way to restart a remote agent host (SSH, WSL, Dev Container) from the UI, equivalent to the existing Developer: Restart Local Agent Host.
Motivation
VS Code already ships workbench.action.chat.restartLocalAgentHost ("Restart Local Agent Host", category Developer), which restarts the local agent-host process. There is no equivalent for remote agent hosts: the only actions available for a remote host are reconnect/disconnect, which re-attach to the same process.
This matters because some agent-host problems are process-scoped and cannot be cleared by reconnecting. Concrete case, still present in 1.147.0-insider: a Claude turn that loses its result during a rebind (_processMessages crashed: Error: Claude SDK stream ended without a result message) stays at the head of the prompt queue for the lifetime of the agent-host process. Every later user message is then enqueued as a steering message on that dead turn (turnId never changes), so the session shows as working forever, in the sidebar and in the chat pane. See #347909 (and #348078, closed as duplicate).
- Locally:
Developer: Restart Local Agent Hostclears it immediately, and the session is restored from the transcript as finished. Verified working. - Remote: nothing in the UI can restart the host. The only workaround is
Remote-SSH: Kill VS Code Server on Host(or killing the agent-host process on the machine), which also kills remote terminals and background tasks, or restarting the whole VS Code window.
So a remote session that hits this regression is effectively unrecoverable from the UI without a heavy, unrelated reset.
Proposal
Expose "Restart Agent Host" for non-local hosts, for example:
- A context-menu action on the host entry in the environments/hosts list (SSH target, WSL distro, Dev Container), next to Reconnect.
- Optionally a command that targets the active remote host, e.g.
workbench.action.chat.restartRemoteAgentHost, mirroring the local command. - Or, if restarting the remote host is considered too invasive, expose a "retry turn" / queue-reset action on the affected session: the queue-head reset that already happens after a client
truncateChatwould repair the session without touching the host process.
Restarting the agent host should restore sessions from their transcripts, the same way the local restart does.
Alternatives considered
- Reconnect / Trigger Reconnect — does not help, the host process and its queue state survive.
- Kill VS Code Server on Host — works, but is a remote-wide reset and kills terminals and long-running tasks.
- Restarting the whole VS Code window — same as above from the client side, and interrupts every other session.
Activity