Canvas extension sendAttachmentsToMessage succeeds but Desktop does not surface or forward attachments
Nobody has claimed this yet.
- Dominant language
- No language data
- Stars
- 2.1k
- Forks
- 157
- PR merge metrics
- No merged PRs in 30d
Description
Affected version or release
GitHub Copilot app v1.1.20
@github/copilot-sdk 1.0.13
Bundled Copilot CLI 1.0.83
macOS 26.6.2 (arm64)
Installation context
A local Canvas extension loaded from .github/extensions in a local GitHub Copilot app session.
What happened?
I am trying to understand the supported behavior of session.rpc.extensions.sendAttachmentsToMessage() in the GitHub Copilot desktop app.
The generated SDK documentation says that the method pushes attachments into the next user-message turn, and that the host should:
- Surface them as composer pills.
- Forward them through the next
session.sendcall.
The RPC resolves successfully when called from an extension-owned connection, but the Desktop composer does not display a pill. When I manually submit the next prompt, the model reports that no attachment is present.
Calling session.send({ prompt }) from the extension immediately after the successful push also sends the prompt without the pushed attachment.
In contrast, passing SVG blobs directly in the same session.send request works correctly. Desktop displays SVG thumbnails and the model can read their contents.
Steps to reproduce
-
Create a Canvas extension and join the foreground session:
const session = await joinSession({ canvases: [canvas], }) -
From a Canvas action or loopback request, call:
await session.rpc.extensions.sendAttachmentsToMessage({ instanceId, attachments: [ { type: 'extension_context', title: '2 Icon Studio references', payload: { kind: 'icon-studio-references', icons: [ { name: 'Gears', svg: '<svg>...</svg>' }, { name: 'Icon Settings', svg: '<svg>...</svg>' }, ], }, }, ], }) -
Observe that the call resolves without an error, but no attachment pill appears in the Desktop composer.
-
Manually send a prompt asking the model to inspect the attachment.
-
Observe that the model reports that no attachment is present.
-
As an additional test, call this immediately after the push:
await session.send({ prompt: 'Analyze the attached Icon Studio references.', }) -
The prompt appears in the conversation, but it still has no attachment.
-
Replace both calls with a single direct send:
await session.send({ prompt: 'Analyze the attached SVG Icon Studio references.', attachments: icons.map((icon) => ({ type: 'blob' as const, data: Buffer.from(icon.svg, 'utf8').toString('base64'), mimeType: 'image/svg+xml', displayName: `${icon.name}.svg`, })), }) -
This works: Desktop displays both SVG thumbnails and the model can read their contents. The runtime materializes them under
/tmp/icon-studio-svgs/.
Expected behavior
After sendAttachmentsToMessage resolves:
- Desktop should display the pushed attachments as composer pills.
- The attachments should be included when the user submits the next prompt.
- Removing a pill should prevent that attachment from being sent.
If this API is not currently supported by the Desktop host, the documentation should clarify its supported hosts and recommend the appropriate Canvas extension workflow.
Additional context
The extension receives no error from sendAttachmentsToMessage.
Questions:
- Is
session.extensions.sendAttachmentsToMessagesupported by GitHub Copilot desktop app v1.1.20? - Does Desktop currently consume the ephemeral
session.extensions.attachments_pushedevent? - Is a feature flag, capability, manifest field, or particular attachment type required?
- Is the extension expected to call
session.senditself? If so, how should it obtain and forward the runtime-stampedextension_contextattachment? - Is direct
session.send({ prompt, attachments: blob[] })the recommended fallback for Canvas extensions?
Related SDK PR: https://github.com/github/copilot-sdk/pull/1502
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the sendAttachmentsToMessage() and session.send() entry points, then review related SDK PR #1502 and the attachments_pushed event handling. Reproduce the Canvas extension flow and verify whether Desktop surfaces the attachments, includes them in the next send, and honors pill removal; if unsupported, document the supported hosts and direct-send fallback.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- api, desktop
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100