From 78fb05040a037115134a24979515f4dcf4df998b Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Fri, 1 May 2026 08:51:26 +0000 Subject: [PATCH] Fix ACP Registry agents using incorrect Cursor-specific auth Add authMethodId and clientCapabilities to CursorAdapterLiveOptions and forward them through makeCursorAdapter to makeCursorAcpRuntime. AcpRegistryDriver now passes authMethodId: 'none' and empty clientCapabilities so generic ACP registry agents no longer incorrectly negotiate with cursor_login auth and Cursor-specific capabilities. --- apps/server/src/provider/Drivers/AcpRegistryDriver.ts | 2 ++ apps/server/src/provider/Layers/CursorAdapter.ts | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/apps/server/src/provider/Drivers/AcpRegistryDriver.ts b/apps/server/src/provider/Drivers/AcpRegistryDriver.ts index 2b69b3d461..5a01f42f1c 100644 --- a/apps/server/src/provider/Drivers/AcpRegistryDriver.ts +++ b/apps/server/src/provider/Drivers/AcpRegistryDriver.ts @@ -137,6 +137,8 @@ export const AcpRegistryDriver: ProviderDriver model?.trim() || "default", + authMethodId: "none", + clientCapabilities: {}, ...(eventLoggers.native ? { nativeEventLogger: eventLoggers.native } : {}), spawn: ({ cwd, environment: spawnEnv }) => ({ command: effectiveConfig.command.trim(), diff --git a/apps/server/src/provider/Layers/CursorAdapter.ts b/apps/server/src/provider/Layers/CursorAdapter.ts index 3518006737..8cf628a51a 100644 --- a/apps/server/src/provider/Layers/CursorAdapter.ts +++ b/apps/server/src/provider/Layers/CursorAdapter.ts @@ -101,6 +101,8 @@ export interface CursorAdapterLiveOptions { }; readonly normalizeModel?: (model: string | null | undefined) => string; readonly applyCursorModelOptions?: boolean; + readonly authMethodId?: string; + readonly clientCapabilities?: EffectAcpSchema.InitializeRequest["clientCapabilities"]; /** * Selections are honored when `modelSelection.instanceId` matches this value. * Defaults to the legacy built-in instance id (`cursor`). @@ -546,6 +548,10 @@ export function makeCursorAdapter( cwd, ...(resumeSessionId ? { resumeSessionId } : {}), clientInfo: { name: "t3-code", version: "0.0.0" }, + ...(options?.authMethodId ? { authMethodId: options.authMethodId } : {}), + ...(options?.clientCapabilities + ? { clientCapabilities: options.clientCapabilities } + : {}), ...acpNativeLoggers, }).pipe( Effect.provideService(Scope.Scope, sessionScope),