Remote agent sessions started via UI running in the background (detach VSCode)

Open
#318,997 3 comments 22 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
38/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Quiet
Tech stack
typescript

Research direction

Start with the Remote agent sessions and Copilot CLI remote-control documentation linked in the issue, then trace how VS Code's remote server and agent UI launch sessions. Done means a session started from the existing UI continues on the remote machine after the local window closes while retaining the relevant VS Code tools and context.

Written by the indexing model from the issue text.

Description

agents-window feature-request
✨ Feature Request
When connected to a remote machine via SSH, I'd love to have the possibility to start an agent session inside VSCode via the UI, but then let it still run when I close my VSCode window on my local machine.

The Remote agent sessions describe two possibilities so far:

  • Agent window with remote connection. Unfortunately, this doesn't work for me as the server I'm working on is behind a VPN, so the agent window won't be able to connect to it. Furthermore, even it that worked, it would be yet another window and not integrated into the existing agent UI (on the sidebar).
  • Copilot CLI remote control. I can launch copilot in a screen, tmux or zellij session, then detach from it. Additionally, one can use /remote on to get the output mirrored to GitHub. This is already amazing! However, so far, I'm not the biggest fan of using agents in the command line as I only see disadvantages with respect to the native UI we have in VSCode. See also the limitations listed in the docs. For example, the Copilot CLI sessions cannot access all VSCode built-in tools. I can also not as easily attach context to it compared to the VSCode UI, e.g. attach files, my debug context, the current internal browser page, etc.

Given that VSCode already spawns its own server on the remote machine that the local instance connects to, I was wondering if that could be leveraged for the agent sessions such that they are spawned on the remote machine. Thus, they could continue to work in the background even when I'm closing the VSCode window on the local machine.

Dominant language
TypeScript
Stars
193k
Forks
42.9k
PR merge metrics
PR metrics pending

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from microsoft/vscode

All issues in microsoft/vscode

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.