Skip to content

Agents window: canvases don't come back after the agent host process restarts #344999

Description

When the agent host process restarts, for example after quitting and relaunching VS Code, canvases that were open in Agents-window Copilot chats don't come back. A resumed chat projects no canvases, so its canvas tabs and canvas list stay empty. A canvas pinned to the sidebar (in progress) stays "Unavailable", and selecting it can't bring the canvas back.

Restarts inside a running host already keep canvases: a configuration refresh and a telemetry-revocation restart hand them over to the replacement session, and an extension reload rehydrates them.

Seen in Code OSS from main at a0fba2a (plus the in-progress pinned canvas changes), macOS 27.2 arm64.

Steps to Reproduce:

  1. Enable chat.canvases.enabled. In the Agents window, have a local Copilot chat open a canvas, for example with open_canvas.
  2. Quit and relaunch VS Code.
  3. Open the chat again.

Actual: The canvas is gone from the chat. The Copilot runtime restored the instance, but the host hides it.

Expected: A canvas the user deliberately kept, such as a pinned one, can be brought back from the UI without asking the agent to reopen it under the same instance ID.

Why

Proposal

  1. Pinned canvases (recommended; client only). When the user selects an unavailable pin, call the existing optional ISessionsProvider.openCanvas (sessionsProvider.ts) with the pin's stored canvasId, extensionId and instanceId. The host's openSessionCanvas resumes a cold chat (copilotAgent.ts), and openCanvas lifts the suppression for that ID, so no host or protocol change is needed. It also stays within Agents window: explicitly reopening a restored Canvas does not show it #343711's explicit-reopen rule. The pin then rebinds by instanceId. To decide or validate:
    • Reopen only on selection (resumes one chat) or eagerly after startup (resumes up to five chats, one SDK residency each).
    • If the runtime no longer has the instance, the same request opens a fresh one under that ID. Is that acceptable for a pin?
    • On a cold resume, check that the reopen isn't dropped while canvas projection is still starting.
  2. Broader (needs product input). Either list restored-but-hidden instances in the chat's canvas menu as "Reopen …" entries, which needs the host to publish them, or project restored instances on resume, which reverses Agents window: explicitly reopening a restored Canvas does not show it #343711 and the documented contract.

Not verified: whether recovering from a Copilot runtime crash (closed connection) keeps canvases.

Related

Activity

  1. added
    agent-host
    canvases
    on Oct 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

agent-hostcanvases

Type

No type

Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions