GROK BOT / when-windows-grok-bot-opens-with-no-window

When Windows Grok Bot opens with no window

Use this when Grok Bot on Windows starts in Task Manager but never shows a window. On some Windows installs, launching Grok Bot starts Electron processes in Task Manager but never shows a window (MainWindowHandle = 0). Restarting Windows may recover one open, then closing and reopening can fail again. Forum report 172502 (francotgs on 0.57.1, often with 150% display scaling) isolates two related pieces: a bad window-state.json, and launches that die with exit_code=21 when Windows refuses the sandboxed window process.

Staff (Colin) says a minimized geometry written into window-state.json is real and flagged, but on its own the app usually falls back to a default size. The launches that produce no window are the exit_code=21 / sandbox-token failures. Colin later tied that class to Windows security updates that affect Chromium sandbox tokens across Cursor and Grok Bot (see KB notes below).

What staff says

Cursor staff (Colin, Sep 21, 2026, forum 172502) says window-state.json is ignored on the next launch and "is not what stops the window from appearing"; the no-window launches are exit_code=21 sandbox refusals. Renaming window-state.json is a user-reported step without staff confirmation. If you want to try it:

  1. Fully quit every Grok Bot.exe process (Task Manager → End task if needed).
  2. In File Explorer, open %APPDATA%\Grok Bot\.
  3. Rename window-state.json to window-state.json.bak (or move it aside).
  4. Launch Grok Bot again from Start or the installed shortcut.

The original poster reported that moving only this file restored a visible window. Bots, chats, credentials, and Agent Computer data stayed intact. Do not wipe the whole user-data folder for this symptom.

A bad file can look like zero width/height and large negative coordinates with isMaximized: true. Fixing the file alone may not cure every exit_code=21 launch; use the launcher workaround next when the Start-menu icon still fails.

User-reported workaround: launch via PowerShell (from the original poster on forum 172502; not confirmed by Cursor staff)

When the original icon keeps failing in the same Windows session, start the same signed executable through a hidden, non-elevated PowerShell parent. OP’s A/B on 172502:

  • Explorer.exe → Grok Bot.exe fails
  • Explorer.exe → powershell.exe → Grok Bot.exe succeeds every open/close cycle

Example (adjust the path if your install differs):

Start-Process -FilePath "$env:LOCALAPPDATA\Programs\Grok Bot\Grok Bot.exe" -WindowStyle Normal

Pin a shortcut to that PowerShell one-liner (or a tiny .ps1 / .cmd wrapper) while the Start-menu path stays broken. Keep the launcher non-elevated.

Windows update / Chromium sandbox note

Staff pointed at Chromium sandbox-token issues after certain Windows updates (discussion on 171690). Affected machines have reported KB5124008 (and later related KBs). Uninstalling a specific KB may help on unmanaged devices and is hard or blocked on managed ones. Prefer the PowerShell launcher first; only change Windows updates with your own admin policy in mind.

How this differs from instant launch crash

If processes flash for about a second and vanish with no window, start with Fix Windows Grok Bot crashing instantly on launch (GPU sandbox / install-folder ACLs). This how-to covers the case where the process tree stays up (or briefly starts) but the UI never appears, including exit_code=21 and corrupt window-state.json.

Related

Pitfalls

  • Deleting the entire %APPDATA%\Grok Bot folder — if you try the user-reported step, rename only window-state.json.
  • Assuming a Windows reboot permanently fixed it — one successful open after reboot can still fail on the next close/reopen.
  • Running Grok Bot elevated “to force the window” — use a normal non-elevated PowerShell parent instead.
  • Mixing this with “Can’t reach your computer” after a healthy window — that is a different path (Fix Grok Bot “Can’t reach your computer”).