Skip to content

Extension canvas.open emits malformed opened event and does not reliably focus #4112

Open

Description

@scotttesler

Problem

A user-scoped Copilot CLI extension can register and manually render a canvas, but calling the documented low-level session.rpc.canvas.open route on resume does not reliably make the canvas visible and emits a malformed event warning in the extension process.

Copilot CLI version: 1.0.71-0 on macOS arm64.

Reproduction

  1. Register a canvas through joinSession({ canvases: [...], requestCanvasRenderer: true }).
  2. After detecting a resumed session, resolve the canvas through session.rpc.canvas.list().
  3. Call session.rpc.canvas.open with the exact returned provider ID:
await session.rpc.canvas.open({
  extensionId: declared.extensionId,
  canvasId: declared.canvasId,
  instanceId: "stable-instance",
  input: { key: "example" },
});

A complete implementation and focused tests are available in the Session Briefing adapter and its test.

Actual behavior

  • The canvas.open promise resolves; the extension's bounded failure diagnostic does not run.
  • The extension process logs failed to deserialize session.canvas.opened payload.
  • The resumed CLI does not reliably show/focus the canvas.
  • The SDK rejects the event because the payload does not satisfy OpenCanvasInstance (provider identity, instance/canvas IDs, reopen, and availability).

Expected behavior

The returned/opened snapshot and session.canvas.opened event satisfy the bundled SDK schema, and reopening a stable instance visibly focuses the canvas.

Additional evidence

  • The same canvas renders successfully when opened through the host's open_canvas tool with the explicit provider ID.
  • Omitting extensionId and passing the exact ID returned by canvas.list() both produce the malformed-event warning.
  • The canvas ID is unique in the session.

A small diagnostic option to log or expose the rejected event shape would also make this class of failure much easier to debug without instrumenting the SDK.

Activity

  1. added
    area:pluginsPlugin system, marketplace, hooks, skills, extensions, and custom agents
    and removed on Jul 14, 2026
  2. patniko commented on Oct 26, 2026

    @patniko
    Collaborator

    Thanks for the report. We've shipped fixes in this area since this was filed (most recently in Copilot CLI v1.0.81), and we believe this may now be resolved. Could you retest on the latest release (Copilot CLI v1.0.103) and let us know whether you still see it? If we don't hear back in a couple of weeks, we may close this issue — you can always reopen it.

    Triaged as part of a Copilot SDK backlog review, with help from GitHub Copilot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:pluginsPlugin system, marketplace, hooks, skills, extensions, and custom agentsmore-info-needed

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions