From 71e745d5fbf34d4cb62019a1d95def8ecbc9a201 Mon Sep 17 00:00:00 2001 From: Ben Brandt Date: Mon, 29 Sep 2025 23:13:12 +0200 Subject: [PATCH] Use default behavior for bypassPermissions mode (#75) They updated the types to allow us to just pass this through now. So we shouldn't have to have the special casing here. --- src/acp-agent.ts | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/acp-agent.ts b/src/acp-agent.ts index 8682c638..5d1ab989 100644 --- a/src/acp-agent.ts +++ b/src/acp-agent.ts @@ -377,16 +377,11 @@ export class ClaudeAcpAgent implements Agent { switch (params.modeId) { case "default": case "acceptEdits": + case "bypassPermissions": case "plan": this.sessions[params.sessionId].permissionMode = params.modeId; await this.sessions[params.sessionId].query.setPermissionMode(params.modeId); return {}; - case "bypassPermissions": - // For some reason, the SDK doesn't support setting the mode to `bypassPermissions` - // so we do it ourselves - this.sessions[params.sessionId].permissionMode = "bypassPermissions"; - await this.sessions[params.sessionId].query.setPermissionMode("acceptEdits"); - return {}; default: throw new Error("Invalid mode"); }