"Enable local self-hosted workers" toggle stuck ON: app restarts a local worker on every launch

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

The toggle “Enable local self-hosted workers” is stuck ON. Clicking it does nothing, including after Cmd+Q and relaunch.

Side effect: the app runs a self-hosted worker on my Mac and restarts it on every launch.

  • Spawned process (detached, parent = launchd):
    …/globalStorage/anysphere.cursor-agent-worker/agent-cli/.local/bin/cursor-agent … worker start --worker-dir /Users/USER/REPO --api-key crsr_XXX --endpoint https://api2.cursor.sh
  • A personal API key I never created manually appeared once in Dashboard > API Keys (grok.com/dashboard/api-keys), apparently created for this worker (now revoked). No new key is created on later launches.
  • The machine was listed under Dashboard > Cloud Agents > Personal machines (Idle) (grok.com/dashboard/cloud-agents).
  • Worker logs show only heartbeats, and the worker’s terminals folder is empty, so nothing was executed. The problem is that it runs at all.

Steps to Reproduce

  1. Settings > Agents > Self-Hosted Workers: click “Enable local self-hosted workers” to turn it OFF → it stays ON.
  2. Cmd+Q, relaunch Cursor.
  3. ls ~/Library/Application\ Support/Cursor/User/globalStorage/anysphere.cursor-agent-worker/
    → agent-cli and cursor-agent-worker-*.{install,spec,log,owner.json,restart.json} are recreated.
  4. pgrep -fl "cursor-agent" → a cursor-agent … worker start process is running (while the key was still valid).

After I revoked that key, the app still restarts the worker on every launch with the same (now invalid) key. The worker log ends with:
⚠ Warning: The provided API key is invalid.
and no process stays alive.

Note: ps aux | grep "agent worker" misses this process (its command line is cursor-agent … worker start).

Expected Behavior

  • The toggle can be turned OFF.
  • When OFF, no worker is spawned on launch.
  • No personal API key is created for a worker without an explicit user action.

Screenshots / Screen Recordings

Operating System

MacOS

Version Information

macOS 27.0.1
Version: 3.26.13 (Universal)
VS Code Extension API: 1.128.0
Commit: 3bfec373749d3d4a53a151283022d49743ab50b0
Date: 2026-10-20T01:50:17.051Z
Layout: Agent Window
Build Type: Stable
Release Track: Default
Electron: 42.10.0
Chromium: 148.0.7778.280
Node.js: 24.18.1
V8: 14.8.178.38-electron.0
xterm.js: 6.1.0-beta.291
OS: Darwin arm64 27.0.0
agent-cli: 2026.10.19
Paid plan, Privacy Mode on

Additional Information

  • Desktop: Remote Control OFF, Automatically register computers OFF, “Unregister All” done, Local self-hosted workers ON (stuck)
  • Web dashboard: Enable self-hosted machines OFF, Enable remote control OFF
  • Agents always launched with Run on → Cloud. Standalone CLI not installed, agent worker start never run.

Questions:

  1. So far no new key is created on relaunch. Could one be created by itself in other situations (e.g. re-login or update)?
  2. Is there a config key/file to force this OFF until fixed?

Thanks

Does this stop you from using Cursor

No - Cursor works, but with this issue

Hey @jeremie-x,

This is a known issue we’re already tracking, and I’ve added your report to it. On current versions that switch is held on by the app regardless of what you save, and the local worker launcher checks the same thing, so it starts a worker on every launch. Your OFF choice is saved on your account; the app just isn’t respecting it right now. The dashboard self-hosted machines setting and “Unregister All” don’t control this worker, which is why neither helped.

The API key came from the app itself: the first time that worker starts, Cursor creates a personal API key for it (its name starts with cursor-agent-worker-ext- followed by your computer name) and stores it on your Mac. That is why later launches didn’t create more, and why it keeps retrying with the one you revoked.

To your questions:

  • An update on its own reuses the stored key, so it shouldn’t create a new one.
  • Signing out and back in (or switching accounts) clears the stored key, and the next start will create a new one while this issue is present. If that happens, revoking the new key in the dashboard stops it again.
  • There’s no setting or config file that forces local workers off yet. Leaving that key revoked is the most effective stopgap for now: the worker can’t connect, so nothing registers and nothing can run on your Mac.

We’ll update this thread when there’s a fix.

Thanks for the clear explanation! I’ll keep the key revoked until the fix lands.

Same issue here on macOS: the “Enable local self-hosted workers” toggle cannot be turned off.

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

In Settings > Agents > Self-Hosted Workers, “Enable local self-hosted workers” stays ON. Clicking the toggle does nothing, and it is still ON after fully quitting (Cmd+Q) and relaunching.

I never intentionally set up a self-hosted worker or ran agent worker start. I only want local agents (“This PC”), plus optionally Remote Control from the iOS app.

Additional observations:

  • “Automatically register computers” was ON by default.

  • pgrep -fl cursor-agent output:

    XXX@XXX-Laptop ~ % pgrep -fl cursor-agent

Why this matters

According to the docs, a self-hosted worker executes Cloud Agent tool calls (file edits, terminal commands, local MCP servers) on my machine with my local credentials. As I understand it, my local Run Mode / Allowlist / Sandbox settings do not apply to it. A worker I cannot disable on my main development laptop is a security concern, even if it is idle.

Steps to Reproduce

  1. Open Settings > Agents > Self-Hosted Workers.
  2. Click “Enable local self-hosted workers” to turn it OFF.
  3. The toggle stays ON. It is still ON after Cmd+Q and relaunch.

Expected Behavior

  • The toggle can be turned OFF and stays OFF.
  • When OFF, no worker process is started and no machine is registered.
  • No API key is created for a worker without explicit user action.
  • Remote Control for local agents keeps working without a self-hosted worker, or the UI clearly explains the dependency.

Operating System

MacOS

Version Information

Version: 3.28.7
VS Code Extension API: 1.128.0
Commit: 25b52e7d03ebf2d5608914158e119f7992432a30
Date: 2026-11-03T02:20:44.943Z
Layout: Agent Window
Build Type: Stable
Release Track: Default
Electron: 42.11.16
Chromium: 148.0.7778.280
Node.js: 24.19.0
V8: 14.8.178.38-electron.0
xterm.js: 6.1.0-beta.291
OS: Darwin arm64 27.2.0

Does this stop you from using Cursor

No - Cursor works, but with this issue. For now I have disabled Remote Control and unregistered my machines as a workaround.