Grok Bot 0.66.0 (macOS): local-exec daemon gets SIGTERM on an unattended, locked Mac and is not restored when the bot needs the machine

Where does the bug appear (feature/product)?

Grok Bot

Describe the Bug

Summary
On a Mac that stays on but is unattended, the local-exec daemon is stopped and never comes back. Chat keeps working; anything that needs my Mac fails until the desktop app is fully quit and reopened, and often a reopen does not bring the daemon back either.

Environment

  • Grok Bot desktop 0.66.0, stable track, Apple Silicon
  • macOS 27.0.1
  • Mac never sleeps (sleep is prevented), Wi-Fi, no VPN or proxy
  • Local tool permission: Always allow
  • I work remotely from this Mac, so the screen is locked and there is no keyboard or mouse input for long stretches (about 21 hours at the time of writing)

What happens

  1. The app starts with two Node utility processes: the supervisor and the local-exec daemon.
  2. After some time the daemon exits. The main process, the window and the supervisor keep running.
  3. ~/.grokbot/local-exec-daemon.log shows a clean stop each time:
    [sand-local-exec-daemon] received SIGTERM, shutting down
  4. The daemon is not started again, including when I later message the bot and it needs the machine.
  5. A full quit and reopen sometimes restores it. Often the relaunched app also comes up with no daemon.

Daemon stop times (PDT)

  • Oct 2, 10:25 AM, after about 15.5 hours up
  • Oct 2, 6:42 PM, after about 6.5 hours
  • Oct 2, 9:42 PM, 13 minutes after launch (the Mac had just rebooted)
  • Oct 3, 8:30 PM, after about 11.5 hours
  • Oct 4, 12:44 AM
  • Oct 4, 3:06 AM

Restart behaviour
I run a small watchdog that quits and reopens the app when the daemon process is missing. Overnight on Oct 3 to 4 it restarted the app 69 times. Most relaunches came up with only the supervisor. The daemon did return after relaunches at 12:45 AM, 3:07 AM and 7:43 AM.

What I ruled out

  • Network: 0% packet loss to router and internet at failure time, DNS fine, and the main process keeps making outbound connections
  • Sleep: the Mac did not sleep
  • Crashes: no crash reports, and the reliability session file shows childDeaths: {}
  • Sign-in: desktop-status.json shows signedIn: true

Other lines in the daemon log

  • [user-computer-provider] poll failed: ConnectError
  • [user-computer-provider] watch stream failed: ConnectError (ECONNRESET)
  • [shell-exec] Close event did not fire within 5000ms after exit ... Killing detached process group.

My guess
This looks tied to the away or park state: the screen is locked and the window is unfocused, the daemon is retired, and it is not brought back when the bot next needs the computer.

Questions

  1. Is the daemon being stopped on a locked, unattended Mac intended?
  2. If so, should it restart on its own when the bot needs the machine? It does not for me.
  3. Is there a supported way to keep local exec available on an unattended Mac with the screen locked?

I can share the full daemon log and before/after snapshots from each restart (processes, connections, lock and idle state, network).

Possibly related: Grok Bot local-exec-daemon on macOS dies after staying healthy; Mac unreachable until leftover processes are killed (0.20.0, marked as fixed in a later release). I’m seeing similar behaviour on 0.66.0, but with a SIGTERM in the daemon log and a locked, unattended Mac.

Steps to Reproduce

  1. On a Mac that never sleeps, open Grok Bot desktop 0.66.0 and sign in. Set local tool permission to “Always allow”.
  2. Confirm local exec works: ask the bot to run a shell command on the Mac. Activity Monitor shows two “Grok Bot Helper” Node utility processes (supervisor and local-exec daemon).
  3. Lock the screen and leave the Mac unattended, with no keyboard or mouse input.
  4. Keep using the bot from another device. Let it finish its work and go idle.
  5. Wait. On my Mac the daemon stopped between 13 minutes and about 15 hours after launch.
  6. Check ~/.grokbot/local-exec-daemon.log. The last line is:
    [sand-local-exec-daemon] received SIGTERM, shutting down
    Only one Node utility process (the supervisor) is left. The main app and window are still running.
  7. From the other device, ask the bot to run a command on the Mac.

Expected: the daemon starts again and the command runs.
Actual: the Mac stays unavailable. The daemon is not restarted.

  1. Fully quit and reopen the app while the Mac is still locked.

Expected: the daemon starts.
Actual: most relaunches come up with only the supervisor. Out of 69 automated relaunches overnight, only a few restored the daemon.

Frequency: 6 daemon stops in about 48 hours. I have not reproduced it on demand; the timing varies.

Operating System

MacOS

Version Information

Grok Bot Version: 0.66.0
Release Track: stable
Build date: 2026-10-01
Bundle ID: com.anysphere.sand
Electron: 42.1.0
Chromium: 148.0.7778.97
Node.js: 24.15.0
OS: macOS 27.0.1 (26A434), Darwin 27.0.0 arm64
Hardware: Mac16,5, Apple M4 Max, 128 GB RAM

Does this stop you from using Cursor

Sometimes - I can sometimes use Cursor

Hey @K_S1, thanks for the detailed report and the timeline, it made this easy to trace.

What you’re seeing comes from a power-saving behavior in recent Grok Bot desktop versions. When nobody seems to be at the Mac (screen locked, or the Grok Bot window in the background for about 10 minutes) and your Bot’s cloud computer has gone to sleep, the app stops the local helper. Right now it only starts it again once someone is back at the Mac (unlock, or bring the Grok Bot window to the front). A Bot asking for your Mac from another device does not bring it back yet. That is why a quit and reopen while the screen is still locked usually comes back without it.

So, to your questions: (1) yes, stopping it on a locked, unattended Mac is currently expected, (2) it should come back when a Bot needs the machine and today it does not, and I’ve flagged that to the team, and (3) there isn’t a supported way yet to keep local access while the screen is locked.

In the meantime, local access only stays up while the Mac is unlocked and the Grok Bot window is in front. If that works for your setup, you can turn off automatic locking in System Settings > Lock Screen and leave Grok Bot as the frontmost app. If you connect to the Mac remotely, clicking into the Grok Bot window during that session also brings the helper back within a few seconds. Your restart watchdog won’t help while the screen is locked, so you can switch it off.

Hi Colin,

Thanks for the quick and clear answer. That matches what I see, and it’s good to know the missing wake-up is flagged with the team.

One data point that may help them. Since my report, my watchdog relaunched the app 25 times while the screen was locked:

  • 23 relaunches came up without the local helper, as you described.
  • 2 relaunches did bring the helper back, with the screen still locked and nobody at the Mac. The most recent was Oct 5 at 7:01 AM PDT.

I don’t know what was different those two times. My guess is the Bot’s cloud computer happened to be awake, but I haven’t confirmed it. Before each relaunch the watchdog also checked for leftover helper processes and never found any, so stale processes don’t seem to be part of this on 0.66.0.

Two questions:

  1. Could the team consider a setting to opt out of the power-saving behavior, for Macs that are meant to run unattended? I work away from this Mac most of the time, so a locked screen is my normal state.
  2. Will the fix for waking the helper when a Bot needs the machine be noted in this thread or the release notes, so I know when to retest?

I have before and after snapshots for every relaunch (processes, connections, lock and idle state, the helper log). I’m happy to share any of it if useful.

Thanks again,
K

Hi @Colin

I’m hitting the same issue on Windows: there are certain tasks that require credentials stored only on my PC, and those tasks have to run on my machine. I don’t want to put those credentials anywhere else, but once the helper is disconnected it can’t launch them and I have to go manually/remotely reactivate the bot, which is quite inefficient.

It would also be great if the bot ran as a resident application that doesn’t depend on a window.

Hi @Colin and team — thanks for the clear write-up on 173728. Sharing a matching repro on a newer build, and two product asks for always-on Macs that run agent fleets.

Environment

  • Grok Bot desktop 0.68.1 (stable), bundle com.anysphere.sand, Apple Silicon
  • Mac Studio used as an always-on agent host (system sleep already disabled; display may blank and the screen locks)
  • Local tool permission: Always allow
  • App Nap already disabled for Grok Bot (NSAppSleepDisabled); that does not change this failure mode

Repro (matches staff description)

  1. Unlock, open Grok Bot, confirm ListMachines shows the Mac connected:true and a Shell on that machine works.
  2. Lock the screen and leave the Mac unattended (no keyboard/mouse). Continue using Bots from elsewhere until the cloud side goes idle.
  3. From another device, call ListMachines / request Shell on the Mac.

Expected (for an always-on host): helper available, or at least restarted when a Bot asks for the machine.
Actual: Mac reports connected:false with the desktop-app-must-be-open guidance. Local-exec log shows a clean park, e.g. received SIGTERM, shutting down and/or desktop ownership lost, shutting down — not a crash (no Crashpad / DiagnosticReports noise for this path).

Unlocking and bringing Grok Bot forward restores the helper, same as you described for 0.66.0. So on 0.68.1 this still looks like intentional unattended park, not App Nap or system sleep.

Why this matters for always-on Mac Studios / agent fleets

Some of us run a Mac as a durable “hands and files” node for agents: locked desk for physical security, but still need remote Shell/file tools without sitting at the console. Today the durable parts of a setup can stay up under launchd, while Grok Bot’s local helper is retired on lock and is not woken when a Bot needs the machine. That splits the product: chat keeps working; anything that needs the Mac fails until a human unlocks or focuses the app.

Community LaunchAgent / quit-reopen watchdogs do not fix this while locked — you already noted that on 173728, and overnight relaunch counts from reporters line up with “app comes back without the helper.” We are not asking people to weaken lock screens or fight the helper with watchdogs as the long-term answer.

Explicit asks

  1. Setting to keep the local helper while locked (or an “always-on / server-like Mac” profile) for machines that are meant to stay available with the screen locked.
  2. Wake / restart the helper when a Bot requests the machine, even if the Mac is locked and Grok Bot was backgrounded — the gap you already flagged to the team on 173728.

Either would unblock always-on hosts; both together would be ideal.

Offer

Happy to test betas or staff builds on this Mac Studio, and to share redacted local-exec daemon log excerpts / before-after process snapshots (lock state, helper present or not) — no account tokens or unrelated prefs.

Thanks again for the transparent “currently expected” call on 173728. Looking forward to a supported path that keeps locked always-on Macs reachable for local tools.

— Lachie

+1, same here. Mac mini M1 running Sequoia as an always-on server, Grok Bot 0.66.0 and then 0.68.1. Sleep is off (pmset sleep 0), App Nap is disabled for com.anysphere.sand, and I also tried launching with --disable-background-timer-throttling --disable-renderer-backgrounding --disable-backgrounding-occluded-windows. It still drops overnight after the display sleeps or locks, and it comes back only when I wake the screen or relaunch the app. My bots run scheduled jobs on the Mac early in the morning, so it needs to stay reachable unattended. Please either let a bot’s request wake the local helper, or add a setting to opt out of the power-saving shutdown.

+1 — Grok Bot 0.68.1, macOS 26.6.2, MacBook Pro. My log shows repeated “desktop ownership lost / SIGTERM” shutdowns, and the Mac shows connected:false until I bring the app forward. I run agent fleets (Orca over WireGuard) that need the Mac’s local tools without me at the keyboard. Please add a setting to opt out of stopping the helper when the Mac is unattended, and/or wake the helper when a Bot asks for the machine.

+1 on this issue, i use grokbot as an orchastrator for certain things on the mac and there are apps that don’t work on the cloud pc i.e. CLI for the Microsoft Work IQ MCP server. I need it to maintain access when i am not at the mac and i do not want to reduce the security of the device by disabling screen locking. Please update the client to introduce an opt out/in option for unattended use like others have asked for. I am sure windows could benefit from the same - Loving grokbot overall, very powerful tool!

+1. Grok Bot 0.68.1 (stable, updated from 0.66.0 on Oct 7; same behavior on both), bundle com.anysphere.sand. macOS 27.0 (26A5425a). MacBook Pro M1 Max (MacBookPro18,2), 64 GB, on AC, system sleep held off by caffeinate, lock set to immediate, display sleep 10 min. Local tool permission: Always allow. Adding a timeline because it suggests the park is tied to the Bot’s cloud computer being recycled, not just to the Mac being locked or idle.

Method: the main app logs nothing about away/park state, and local-exec-daemon.log has no timestamps. So I timed the helper by its gateway DNS lookups in mDNSResponder (it looks up the gateway every ~30 s, and the PIDs match the “started (pid N)” lines in the daemon log). I timed Bot commands by tccd entries crediting osascript runs to com.anysphere.sand.

Timeline, Oct 8 (ET):

  • 04:04 last keyboard/mouse input
  • 04:14:14 display off + screenIsLocked
  • 04:14 to 06:03 screen locked, zero Bot commands for almost 6 hours (last one 00:09:36), helper pid 12409 kept its 30 s heartbeat the whole time
  • 06:03:34 to 06:04:43 Bot burst (13 osascript)
  • 06:47:44 to 06:47:54 Bot burst (6 osascript)
  • 06:47:57 screenIsUnlocked (Apple Watch auto-unlock after one keypress), no further input
  • 06:58:05 display off + screenIsLocked, stayed locked until 08:54:02
  • 07:04:20 to 07:04:34 Bot burst (7 osascript)
  • 07:17:10 to 07:17:43 last Bot command
  • 07:20:51 last heartbeat from helper 12409
  • 07:21:08 supervisor stops its regular network polling (main app keeps running)
  • 07:21:20 Bot’s cloud computer restarts its agent-store mount with a new pod grant (looks like re-provisioning)
  • daemon log line 4400: [sand-local-exec-daemon] received SIGTERM, shutting down
  • 07:21 to 08:54 no helper, Mac unreachable from Bots
  • 08:37:37 ~/.grokbot/local-exec-backend-return.json written (“backend returned”), helper not restarted because the Mac was still locked
  • 08:54:02 unlock, helper restarted within ~5 s

What this shows:

  1. The lock alone did not park the helper. It survived 3 hours locked, including ~2 hours with no Bot activity at all.
  2. The SIGTERM landed ~3.5 min after the last Bot command and within ~30 s of the cloud computer being re-provisioned.
  3. Earlier re-provisioning events on the cloud side (Oct 7 17:20:33, Oct 7 06:44:54, Oct 6 ~13:14) line up with my other outages (down from about 17:20 Oct 7, around 06:00 Oct 7, around midday Oct 6).
  4. The helper also rode through a low-battery sleep at 01:33 and came back on its own, so this isn’t system sleep.

Other daemon log lines from the same period:
[user-computer-provider] watch stream failed: ConnectError (ECONNRESET)
[user-computer-provider] watch stream failed: ConnectError (ETIMEDOUT)
[user-computer-provider] watch stream failed: ConnectError (ENOTFOUND)
[sand-local-exec-daemon] desktop ownership lost, shutting down
Wi-Fi was stable, DNS answered throughout, no VPN active, no crash or hang reports.

Ruled out: App Nap/throttling (the app stays reachable for hours while I use the Mac with Grok Bot in the background), system sleep, network, crashes.

From reading the 0.68.1 app.asar (my interpretation of the bundled code, happy to be corrected):

  • away = isSuspended || isScreenLocked || (unfocused && idle >= 10 min). isScreenLocked comes from Electron powerMonitor.getSystemIdleState(), polled every 15 s plus the lock-screen event.
  • Once away, demand mode is set to “hold” before the “a Bot opened this computer remotely” check is reached, so a remote request can’t restore the helper while locked.
  • The helper is only SIGTERMed when away AND the cloud computer is dormant (“away-parked”). Away with the cloud computer running keeps the helper. That would explain K_S1’s 2 good relaunches out of 69, and why mine survived the 04:14 lock.
  • Separately, the helper exits with “desktop ownership lost” if the main app’s heartbeat goes stale for more than 90 s.
  • The behavior is behind the Statsig gate sand_desktop_away_park, which is true in my cached bootstrap. I found no local override.

Taken with the timeline above, my read is that “cloud computer dormant” includes it being re-provisioned, and that’s what actually fired the park at 07:21.

Asks, same as others here:

  1. Let a Bot’s request for the machine restart the helper even when the Mac is locked.
  2. An opt-out from the away park for Macs meant to stay reachable.
  3. If parking is tied to the cloud computer being recycled, keep or restore the helper across that event so it doesn’t need a human to unlock.

Happy to share more log excerpts if useful.

Follow-up with a workaround that’s working for me.

Test today (Oct 8): with the screen locked (CGSSessionScreenIsLocked = 1) and the Bot’s cloud computer awake, a full quit and relaunch of Grok Bot brings the local-exec helper back, and the Bot can use it right away. Old helper got SIGTERM from the quit, new one came up in a few seconds, and the Bot’s next commands ran through it. So a relaunch while the cloud side is awake un-parks it, even under a lock. Also, 23 minutes locked and idle with no Bot commands did not park it, which fits the park being tied to the cloud computer being recycled, not the lock alone.

The workaround, for anyone else stuck on this:

  • A private GitHub repo used only as a signal line.
  • On the Mac, a LaunchAgent that checks every 60 s for an open issue titled “restart”. If one exists, it quits and relaunches Grok Bot, waits 45 s, confirms the helper is up, and closes the issue with a before/after comment. It acts on the issue existing and never reads its text.
  • The Bot has a fine-grained token scoped to that one repo, Issues read/write only. When a local tool fails because the Mac is unreachable, it opens a “restart” issue, waits for it to close, and retries once.

End to end it takes about 75 seconds. Tested both directions today: Bot opened the issue, Mac relaunched and closed it with “helper up after restart”, and the Bot’s next command ran on the new helper.

It works, but it shouldn’t be needed. A built-in way for a Bot request to wake a parked helper, or a setting to turn off the away park, would make all of this unnecessary.

Another similar workaround that’s working for me on Windows, with no repo or polling script involved.

I already had a Cursor Cloud Agents worker running on the same PC as Grok Bot. It’s started by a scheduled task at logon and is always reachable from the cloud. Because it keeps its own connection, it stays available even after the Grok Bot local helper gets parked.

What I did:

  1. Worker on the PC: have a private Cloud Agents worker started by a Task Scheduler task at logon, so it runs in the background in your interactive Windows session and can open windows.
  2. Ask your Bot to set it up: tell it something like “Open a cloud agent on my worker [name]. It shouldn’t change any code. Have it find the Grok Bot executable and save the path. When this machine shows disconnected, reply in that chat asking it to kill Grok Bot.exe and start it again, check ListMachines and retry the task. Save all this as a skill so every Bot can do it.”

From then on, whenever a Bot finds the PC connected: false, it follows the skill automatically: it asks the worker to relaunch the app, checks that the PC is back and retries the task.

A built-in way for a Bot request to wake the helper would still be much better.

Having a similar issue on windows.

grokbot messages,

Can’t connect to pc

Same issue here on 0.68.1. M2 MacBook Pro on AC power via a Belkin Thunderbolt dock (ethernet + Wi-Fi), system sleep disabled (pmset sleep 0), display sleep 10 min, App Nap disabled for com.anysphere.sand.

A test about a minute after locking worked fine. Overnight, though, my bot’s scheduled 5:47 AM routine failed with “Your local machine isn’t connected right now” even though the Mac was awake and online. The Grok Bot app was still running and making outbound connections every few seconds all night. The Mac stayed unreachable well into the evening, and access came back only once I unlocked it and the local helper restarted.

+1 to letting a bot’s request bring the helper back on a locked Mac, or adding a setting to keep local access available while locked. Scheduled maintenance routines are pretty much useless overnight until then.

Same issue here on a MacBook Pro running the current Grok Bot app. When the Mac is locked (awake, display off, idle sleep prevented), my bot reports the computer as disconnected until I unlock it or bring the Grok Bot window to the front. I rely on Grok Bot having continuous remote access to my computer to work on my files while I’m away, the way Codex already can on the same machine. A setting to keep the local helper running while locked, or having a bot’s request wake it, would solve this for me. +1 for a fix.

hi there, any update of this issue given that it’s quite a long time since we reported back

Hey everyone,

Since version 0.70.2, Grok Bot desktop no longer stops the local helper when nobody is at the computer. That includes a locked screen, a sleeping display, or the Grok Bot window sitting in the background. The helper stays up, so your Bots can keep using your Mac or PC while you’re away. The current version, 0.71.2, includes this too.

Hi Colin. I can confirm that I haven’t had to reconnect the bot in the last 3 days, not even with the PC locked. Thanks!