Where does the bug appear (feature/product)?
Grok Build (formerly Cursor)
Describe the Bug
Where does the bug appear (feature/product)?
Grok Build (formerly Cursor) — local Agents Window / agent-host-daemon
Describe the Bug
I’m filing this with a clear root cause and a painful UX false lead. I’m pretty irritated about the time and token spend chasing a “sign in” problem that wasn’t sign-in — but I also know whoever reads this probably didn’t ship the bug, and whoever can fix it probably didn’t invent the misleading error. Please just help get this unstuck / fixed.
Summary: On the Mac that owns the machine (local Cursor / Agents Window), local Agents Window is dead: UI says sign-in / “the account that owns this agent signed out,” turns fail with unauthenticated + route_reason: enrollment-denied.
At the same time, Agents Window over SSH from other machines to this host works fine.
Editor Agent on the same Mac does work (fallback in-process host). Verified with a one-line turn (editor-agent-ok).
So this is not “logged out of Cursor.” Auth was a red herring. The real issue is daemon ownership.
Root cause (from logs): Local desktop repeatedly hits:
ForeignDaemonError: an agent host this app did not start holds
/Users/mike/.grok/agent-host-daemon/daemon.sock
(molten-glass-ssh:…-darwin-arm64-…:--remote:--trusted-workspaces:on)
Same message in molten:
An agent host this app did not start holds …/daemon.sock
(molten-glass-ssh:…:--remote:…)
The process holding the sock is daemon.cjs started with --remote (identity molten-glass-ssh), i.e. an Agents Window SSH client from another machine owns the single host daemon on this box. Local Agents Window then refuses that foreign host and surfaces it as auth failure (enrollment-denied / unauthenticated / “signed out”).
Sign out / sign in / browser login does nothing useful here. Of course it doesn’t — the sock isn’t ours.
Why this burned a lot of time / money
- The product UI blamed account / sign-in, so I burned cycles (and tokens) on keychain, login, “CLOUD_AUTH”-shaped naming, re-auth, etc.
- There was a useful popup about “this agent host wasn’t started in the Agents Window / sessions started here will only…” — the exact class of warning that matches
ForeignDaemonError. - That popup was clobbered by product advertising for a feature I did not ask for, so I couldn’t read the one message that pointed at the real failure.
- Meanwhile remotes keep working, which makes the local failure look like a flaky local account bug instead of exclusive foreign ownership of
daemon.sock.
I’m fine paying for useful agent work. Paying to debug a misleading auth UX while the real error is “SSH foreign host owns the daemon” is a bad product experience.
What I want from the product
- Stop lying with auth UX when the failure is
ForeignDaemonError/ foreign sock ownership. Show the foreign-host message and keep it visible (don’t cover it with ads). - Document / support coexistence or handoff: local desktop + SSH Agents Window clients sharing one machine without “first remote to grab the sock wins forever / local is dead.”
- If exclusive ownership is intentional for now: make that explicit in UI, with a one-click “reclaim local agent host” that doesn’t require spelunking
pkill+ hoping remotes don’t immediately steal it back. - Please don’t make “sign in again” the first response to
enrollment-deniedwhen logs already know it’s a foreign daemon.
Steps to Reproduce
- On Mac host H, open Agents Window from remote machine R over SSH to H (this starts
daemon.cjswith--remote/molten-glass-sshowning~/.grok/agent-host-daemon/daemon.sock). - On host H, open local Cursor Agents Window and try a local agent turn.
- Observe UI: sign-in / “account that owns this agent signed out”; molten logs:
ForeignDaemonError+route_reason: enrollment-denied/error_code: unauthenticated. - Observe remotes still work; editor Agent on H may work via in-process fallback after the same
ForeignDaemonError.
Expected Behavior
Local Agents Window on the machine that owns the host either shares the daemon with SSH Agents Window clients, or clearly tells me a foreign SSH agent host owns the sock and offers reclaim — not a fake signed-out / sign-in loop. The useful foreign-host warning must not be covered by ads.
Actual Behavior
Local Agents Window fails as unauthenticated / enrollment-denied / signed-out while daemon.sock is held by molten-glass-ssh … --remote. Remotes keep working. Editor Agent falls back and works.
Operating System
macOS 27.2.1 (darwin arm64) — machine used both as local desktop and as SSH Agents Window target
Version of Cursor
3.32.25
Additional Information
- Daemon sock:
~/.grok/agent-host-daemon/daemon.sock - Holding process identity:
molten-glass-ssh+--remote - Editor Agent: works after
ForeignDaemonError(in-process host) - Workaround attempting: quiet remotes →
pkillthe--remotedaemon.cjs→ start local Agents Window first → reconnect remotes. Expect remotes may seize the sock again asmolten-glass-ssh --remoteand re-break local. If that’s expected, document it; if not, it’s a bug. - Happy to provide more log excerpts.
Steps to Reproduce
as above
Expected Behavior
doesn’t matter which agent window on what host local or not started, you should be able to start a local agents window and get to work
Operating System
MacOS
Version Information
all information included above
For AI issues: which model did you use?
all models fail
Does this stop you from using Grok
Yes - Grok is unusable