[Requests and ideas] Title: Let canvas extensions invoke host/app capabilities (e.
- Dominant language
- No language data
- Stars
- 2.1k
- Forks
- 153
- PR merge metrics
- No merged PRs in 30d
Description
**Mood:** 😔
**Category:** Requests and ideas
Title: Let canvas extensions invoke host/app capabilities (e.g. create_session) without round-tripping through an agent turn
What I'm building
I built a user-scoped canvas extension ("Quest Board") that turns my Daily Brief into gamified XP quests. Each quest card has a Start session button: it should open a new Copilot session seeded with that quest's full context so I can start working on it immediately.
The gap
A canvas extension runs as a forked Node process speaking the extension JSON-RPC protocol. It has no way to create a session. Session creation (create_session, plus the related orchestration tools like list_projects, open_pr_session, send_session_message) is an app/agent capability — it's exposed to the agent as a tool, but it is not on the extension SDK surface. I checked session.rpc: the available namespaces are send, abort, suspend, shutdown, auth, canvas, model, mode, plan, fleet, agent/tasks, schedule, etc. — none create an app project-session. The only createSession in the SDK lives on CopilotClient (the host that owns the runtime), which an extension can't reach.
The workaround (and why it's awkward)
The only lever an extension has is session.send(), which injects a user turn into the current session; the agent in that turn then calls create_session. So my button has to "send a message on the user's behalf." It works, but:
It pollutes the transcript with a turn the user didn't type (it reads like the extension is impersonating me).
It only works in an interactive session. From a non-interactive/automation run there's no agent to surface a turn, so I had to add a marker-file relay (session-request.json) that any other open interactive board claims and replays — extra moving parts for what should be one call.
I had to push the real instructions into a hidden onUserPromptSubmitted additionalContext hook just to keep the visible message clean. Clever, but clearly working around a missing API.
What I'd like
A sanctioned, capability-gated way for a canvas/extension to request host actions directly, e.g.:
session.host.createSession({ projectId, kickoffPrompt, mode }) (and friends: listProjects, openPr, openIssue, sendSessionMessage), or
a generic "request host tool invocation" bridge the user can permission-gate, so extensions can call the same orchestration tools the agent already has.
Ideally gated behind a capability flag (like elicitation is) so the host stays in control and can prompt for consent. This would let canvas buttons (Start session, open PR, jump to another session, schedule a workflow) work in one clean call — no synthetic user turns, no marker-file relays, and consistent behavior between interactive and automation contexts.
Why it matters
Canvas extensions are positioned as rich, interactive surfaces, but right now their buttons can only talk to the agent, not act on the host. Closing that gap would make them feel like first-class app UI instead of indirect prompt-injectors.
---
| Field | Value |
| --- | --- |
| App version | 1.0.2 |
| OS | Windows 10.0.26200 |
| Theme | GitHub |
| Path | /chat |
| Tenure | Week 2 |
Contributor guide
Research direction
Start with the canvas extension JSON-RPC protocol, session.rpc namespaces, and CopilotClient.createSession to map the existing boundary between extensions and host capabilities. Define a capability-gated host-action path for create_session and related actions, with completion shown by direct requests working consistently in interactive and automation contexts without synthetic user turns.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- node.js
- Domain
- api, developer-experience
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100