Feature Request: Public API to observe Copilot Chat conversation lifecycle status from external extensions
Category: Extension API / Chat API
Problem Statement
There is currently no public (or proposed) API that allows an external VS Code extension to observe the lifecycle status of a native Copilot Chat conversation — specifically whether a request is in progress, completed successfully, failed, or cancelled by the user.
This makes it impossible to build extensions that need to react to Copilot Chat's execution state for orchestration, task control, or integration purposes (e.g., an extension that triggers follow-up actions when a Copilot agent task finishes or fails).
Current State
The internal codebase already defines a ChatSessionStatus enum with exactly the states needed:
export enum ChatSessionStatus {
Failed = 0,
Completed = 1,
InProgress = 2,
NeedsInput = 3
}
And an onDidChangeStatus event exists internally on session objects. However, these are only used for managing the session list UI of Claude Code / Copilot Cloud agent sessions — they are not exposed to external extensions observing the main Copilot Chat panel.
The existing chatHooks proposed API (Stop, ErrorOccurred, etc.) is the closest mechanism, but it is shell-command-based, requires manual user configuration, cannot be registered programmatically by an extension, and does not distinguish between a completed vs. cancelled request.
Requested API
A new proposed (or public) API that allows external extensions to subscribe to Copilot Chat request lifecycle events:
// Option A: Event-based (preferred)
namespace chat {
/**
* Fired when the status of a Copilot Chat request changes.
*/
export const onDidChangeChatRequestStatus: Event<ChatRequestStatusChangeEvent>;
}
export interface ChatRequestStatusChangeEvent {
/** The session/thread ID of the chat conversation */
readonly sessionId: string;
/** The new status of the most recent request in this session */
readonly status: 'running' | 'completed' | 'failed' | 'cancelled';
/** Optional error information when status is 'failed' */
readonly error?: Error;
}
// Option B: Query-based (simpler to implement)
namespace chat {
/**
* Returns the current status of the active Copilot Chat request, if any.
*/
export function getActiveChatRequestStatus(): 'idle' | 'running' | undefined;
}
Additional Context
- This request is specifically about the main Copilot Chat panel (agent mode), not Claude Code or Copilot Cloud sessions.
- A minimal viable version would be a single
onDidChangeChatRequestStatus event with running / completed / failed / cancelled states.
- I'm happy to participate in API design discussions.
Feature Request: Public API to observe Copilot Chat conversation lifecycle status from external extensions
Category: Extension API / Chat API
Problem Statement
There is currently no public (or proposed) API that allows an external VS Code extension to observe the lifecycle status of a native Copilot Chat conversation — specifically whether a request is in progress, completed successfully, failed, or cancelled by the user.
This makes it impossible to build extensions that need to react to Copilot Chat's execution state for orchestration, task control, or integration purposes (e.g., an extension that triggers follow-up actions when a Copilot agent task finishes or fails).
Current State
The internal codebase already defines a
ChatSessionStatusenum with exactly the states needed:And an
onDidChangeStatusevent exists internally on session objects. However, these are only used for managing the session list UI of Claude Code / Copilot Cloud agent sessions — they are not exposed to external extensions observing the main Copilot Chat panel.The existing
chatHooksproposed API (Stop,ErrorOccurred, etc.) is the closest mechanism, but it is shell-command-based, requires manual user configuration, cannot be registered programmatically by an extension, and does not distinguish between a completed vs. cancelled request.Requested API
A new proposed (or public) API that allows external extensions to subscribe to Copilot Chat request lifecycle events:
Additional Context
onDidChangeChatRequestStatusevent withrunning/completed/failed/cancelledstates.