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.
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
Settings > Agents > Self-Hosted Workers: click “Enable local self-hosted workers” to turn it OFF → it stays ON.
Cmd+Q, relaunch Cursor.
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.
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.
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.
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
Open Settings > Agents > Self-Hosted Workers.
Click “Enable local self-hosted workers” to turn it OFF.
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.