Skip to content

Commit 4acf778

Browse files
la14-1spawn-botclaude
authored andcommitted
fix(cursor): set CURSOR_API_KEY to skip browser login (#3104)
Cursor CLI requires authentication before making API calls. Without CURSOR_API_KEY set, it falls back to browser-based OAuth which fails because the proxy spoofs api2.cursor.sh to localhost, breaking the OAuth callback. Setting a dummy CURSOR_API_KEY makes Cursor use the /auth/exchange_user_api_key endpoint instead, which the proxy already handles with a fake JWT. Co-authored-by: spawn-bot <spawn-bot@openrouter.ai> Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent af06742 commit 4acf778

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

packages/cli/src/shared/agent-setup.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1128,6 +1128,7 @@ function createAgents(runner: CloudRunner): Record<string, AgentConfig> {
11281128
),
11291129
envVars: (apiKey) => [
11301130
`OPENROUTER_API_KEY=${apiKey}`,
1131+
"CURSOR_API_KEY=spawn-proxy",
11311132
],
11321133
configure: () => setupCursorProxy(runner),
11331134
preLaunch: () => startCursorProxy(runner),

0 commit comments

Comments
 (0)