Problem
VS Code's Copilot Agent Mode requires interactive permission approval for tool calls (file edits, terminal commands, MCP tools). These approvals can only be resolved through the VS Code UI — clicking "Allow" / "Deny" in the editor window.
This creates a productivity gap: when the agent is working on a multi-step task, the developer must remain at the keyboard watching for permission dialogs. There is no way to:
- Observe agent activity from outside the VS Code window
- Approve/deny permission requests programmatically (e.g., from another device)
- Build extension-based workflows around agent mode events (audit logging, custom approval policies, remote supervision)
Proposed API
A new proposed extension API surface that exposes agent mode permission events to extensions:
// vscode.proposed.chatAgentPermissions.d.ts
declare module 'vscode' {
export namespace chat {
/**
* Fired when the agent requests permission to use a tool.
* Extensions can observe this for logging, or resolve it
* to provide programmatic approval/denial.
*/
export const onDidRequestToolPermission: Event<ChatToolPermissionRequest>;
/**
* Read-only list of currently pending permission requests.
*/
export const pendingToolPermissions: readonly ChatToolPermissionRequest[];
}
export interface ChatToolPermissionRequest {
/** Unique request ID */
readonly id: string;
/** The tool being requested */
readonly toolName: string;
/** Permission kind */
readonly kind: 'file-edit' | 'file-create' | 'file-delete' | 'terminal' | 'mcp-tool';
/** Human-readable description of what the tool will do */
readonly description: string;
/** Detailed context (file path, command, diff preview) */
readonly details: Record<string, unknown>;
/** Timestamp when the request was created */
readonly timestamp: number;
/** Resolve the permission request programmatically */
resolve(approved: boolean): void;
}
}
Use Cases
- Remote supervision: An extension bridges permission requests to a mobile device (phone/tablet) via WebSocket, letting developers approve agent operations while away from the keyboard
- Custom approval policies: Extensions implement org-specific rules (e.g., auto-approve test file edits, always deny production config changes)
- Audit logging: Extensions log all tool calls and permission decisions for compliance
- Team workflows: Permission requests routed to a senior developer for review
Why This Belongs in VS Code Core
chat.tools.autoApprove already allows bypassing the UI entirely — programmatic resolution is philosophically consistent
- The Chat Participants API (
vscode.chat.createChatParticipant) already exposes chat events to extensions — permission events are a natural extension of this pattern
- Without this API, extensions must resort to fragile workarounds (accessibility tree manipulation, UI automation) that break across versions
Relationship to Existing APIs
| Existing API |
Relationship |
chat.tools.autoApprove setting |
This API is the programmatic equivalent — extensions make the approve/deny decision instead of a static setting |
ChatParticipant API |
Same pattern — exposing chat subsystem events to extensions |
window.showInformationMessage with actions |
Permissions are currently UI-only dialogs; this adds a programmatic channel |
Backward Compatibility
- No breaking changes — the existing UI permission flow continues to work as-is
- Extensions that register a listener get a parallel notification; the UI dialog can still be used
- If an extension resolves a permission before the user clicks the dialog, the dialog is dismissed
- If the user clicks the dialog before any extension resolves it, the extension's
resolve becomes a no-op
Motivation: Agentic Coding is Async, Permission Approval Shouldn't Require Presence
As Agent Mode becomes the primary Copilot workflow, developers increasingly kick off multi-step tasks and step away. The current model forces synchronous human presence for every permission gate. This API would let the ecosystem build remote supervision tools (mobile apps, push notifications, Teams bots) that keep the human in the loop without requiring them at the keyboard.
Problem
VS Code's Copilot Agent Mode requires interactive permission approval for tool calls (file edits, terminal commands, MCP tools). These approvals can only be resolved through the VS Code UI — clicking "Allow" / "Deny" in the editor window.
This creates a productivity gap: when the agent is working on a multi-step task, the developer must remain at the keyboard watching for permission dialogs. There is no way to:
Proposed API
A new proposed extension API surface that exposes agent mode permission events to extensions:
Use Cases
Why This Belongs in VS Code Core
chat.tools.autoApprovealready allows bypassing the UI entirely — programmatic resolution is philosophically consistentvscode.chat.createChatParticipant) already exposes chat events to extensions — permission events are a natural extension of this patternRelationship to Existing APIs
chat.tools.autoApprovesettingChatParticipantAPIwindow.showInformationMessagewith actionsBackward Compatibility
resolvebecomes a no-opMotivation: Agentic Coding is Async, Permission Approval Shouldn't Require Presence
As Agent Mode becomes the primary Copilot workflow, developers increasingly kick off multi-step tasks and step away. The current model forces synchronous human presence for every permission gate. This API would let the ecosystem build remote supervision tools (mobile apps, push notifications, Teams bots) that keep the human in the loop without requiring them at the keyboard.