[FEATURE] VS Code extension: view/attach to background agents so conversations survive window close

Open 💬 0 comments Opened Jul 8, 2026 by mjarret

Feature request

Let the VS Code extension view and attach to supervisor-hosted background agents (claude --bg / claude agents), so a conversation can keep running on the host when the window closes and be picked up later in the extension UI — live, not as a transcript resume.

Environment

  • Claude Code CLI + VS Code extension v2.1.204 (linux-x64), used over Remote-SSH
  • Host: Ubuntu, loginctl linger enabled

Current behavior

  • Extension conversations are window-tied: closing the window or dropping SSH kills the in-flight conversation (scheduled wakeups, loops, background tasks all stop). History resumes via the sessions sidebar / claude --resume, but the process is dead.
  • Background agents started with claude --bg survive disconnects and are attachable from the CLI (claude agents), but the extension cannot see or attach to them. The sessions-list sidebar shows transcripts only.
  • No extension setting provides background persistence (checked useTerminal, claudeProcessWrapper, etc.), and docs (vs-code.md, agent-view.md) and changelog 2.1.190–2.1.204 are silent on extension↔supervisor integration.

Desired behavior

Either (or both):

  1. The extension's sessions sidebar lists live supervisor-hosted background agents and can attach to one, taking over as the UI for the running process (single writer).
  2. A "keep running in background" affordance on an extension conversation — closing the window detaches the UI but hands the session to the supervisor instead of killing it, symmetric with the CLI's background-agent behavior.

Use case

Long-running autonomous research sessions (self-rescheduling proof-search loops at ~10-minute cadence) driven over SSH from VS Code. The work must continue across disconnects; the CLI-in-tmux workaround functions but gives up the extension UI entirely. Attach-from-extension would make background agents the natural home for these sessions.

View original on GitHub ↗