Expose read access to chat session status (ChatSessionStatus) for third-party extensions
- Dominant language
- TypeScript
- Stars
- 193k
- Forks
- 42.4k
- PR merge metrics
- PR metrics pending
Description
## Feature request
Allow third-party extensions to **observe** chat sessions and their status, a read/subscribe side to the chat sessions API.
## Current behavior
The proposed `chatSessions` API (`vscode.proposed.chatSessionsProvider.d.ts`) already models exactly the information needed, `ChatSessionStatus` with `InProgress`, `NeedsInput`, `Completed`, `Failed` , but it is contribute-only: an extension can register and manage **its own** session items (as Copilot Chat and Copilot CLI do), while there is no API to query or subscribe to session status owned by other extensions. The status is rendered in the Chat Sessions view but is otherwise inaccessible.
## Use case
I'm building a hardware device similar to OpenAI's [Codex Micro](https://mashable.com/tech/openai-first-physical-release-is-micro-keyboard), a small control pad whose illuminated per-agent keys show whether each coding agent is thinking, waiting for input, or finished. A companion VS Code extension feeds it status for the agents running in the editor.
For Claude Code sessions, this works today because Claude Code exposes lifecycle hooks that the extension can consume outside of VS Code. For Copilot Chat / Copilot CLI agent sessions, there is no equivalent: the status exists inside VS Code (the Chat Sessions view shows it) but cannot be read by another extension, so those agents can't light up the device. The same limitation applies to purely software use cases, e.g. a status bar item summarizing all running agent sessions.
## Proposal
Something along the lines of:
```ts
namespace chat {
export function getChatSessionItems(): readonly ChatSessionItem[];
export const onDidChangeChatSessionItems: Event;
}
```
- Read-only: session id, label, `ChatSessionStatus`, session type, no access to conversation content.
- Ideally available to stable (non-proposed) extensions once the chat sessions API ships.
Related: #288457, #288459 (adoption of the chat sessions controller API for Copilot CLI and Claude sessions. Both would become observable through such an API).
Contributor guide
Research direction
Start with vscode.proposed.chatSessionsProvider.d.ts and compare the existing ChatSessionStatus and ChatSessionItem definitions with the proposed read-only functions and event. Read related issues #288457 and #288459 for the extension adoption context. Done means an agreed API design that exposes session identifiers, labels, status, and type without conversation content, with its stability scope resolved.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- api, developer-experience
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100