Skip to content

Commit fbc08ab

Browse files
robertpykeRobert Pyke
authored andcommitted
fix: queue concurrent permission requests to prevent silent cancellations
When multiple permission requests arrived simultaneously, each showQuickPick call would dismiss the previous one, silently returning 'cancelled'. This caused allow_always selections to appear broken — the agent would keep re-asking for permissions that the user had already approved. Added a serial promise queue to PermissionHandler so concurrent requests are shown one at a time.
1 parent 79d3891 commit fbc08ab

4 files changed

Lines changed: 15 additions & 19 deletions

File tree

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@ All notable changes to the "vscode-acp" extension will be documented in this fil
44

55
Check [Keep a Changelog](http://keepachangelog.com/) for recommendations on how to structure this file.
66

7+
## [0.1.4]
8+
9+
### Fixed
10+
- Queued concurrent permission requests so multiple prompts no longer clobber each other’s QuickPick dialogs, which was silently cancelling approvals and causing repeated trust prompts
11+
712
## [0.1.3] - 2026-03-01
813

914
### Added

package-lock.json

Lines changed: 3 additions & 13 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "acp-client",
33
"displayName": "ACP Client",
44
"description": "Agent Client Protocol client for VS Code — connect to GitHub Copilot, Claude Code, Gemini CLI, Qwen Code, Codex CLI, OpenCode, OpenClaw, and any ACP-compatible AI coding agent",
5-
"version": "0.1.3",
5+
"version": "0.1.4",
66
"publisher": "formulahendry",
77
"license": "MIT",
88
"icon": "resources/icon.png",

src/handlers/PermissionHandler.ts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,12 @@ export class PermissionHandler {
1414

1515
async requestPermission(params: RequestPermissionRequest): Promise<RequestPermissionResponse> {
1616
const result = this.queue.then(() => this.handlePermission(params));
17-
this.queue = result.then(
18-
() => undefined,
19-
() => undefined,
20-
);
21-
return result.catch(() => ({ outcome: { outcome: 'cancelled' as const } }));
17+
this.queue = result.then(() => {}, () => {});
18+
return result.catch((err) => {
19+
log(`Permission request failed: ${err}`);
20+
sendEvent('permission/responded', { permissionType: params.toolCall?.title || 'Permission Request', outcome: 'error' });
21+
return { outcome: { outcome: 'cancelled' as const } };
22+
});
2223
}
2324

2425
private async handlePermission(params: RequestPermissionRequest): Promise<RequestPermissionResponse> {

0 commit comments

Comments
 (0)