Skip to content

Allow restarting a remote agent host (SSH/WSL/Dev Container) from the UI #348798

Open

Agent suggestions

Public preview

Description

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 Host clears 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:

  1. A context-menu action on the host entry in the environments/hosts list (SSH target, WSL distro, Dev Container), next to Reconnect.
  2. Optionally a command that targets the active remote host, e.g. workbench.action.chat.restartRemoteAgentHost, mirroring the local command.
  3. 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 truncateChat would 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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions