Grok Bot computer: Cursor CLI `agent -p` stuck on "Connection lost, reconnecting" since Oct 19 (Codex works from same machine)

Where does the bug appear (feature/product)?

Cursor CLI

Describe the Bug

Since 2026-10-19, Cursor CLI hangs on every prompt from my Grok Bot computer, even a trivial one. It loops on “Connection lost, reconnecting to agentn.global.api5.cursor.sh (attempt 1)” with no error code until timeout (90s; one run hung ~8 hours). composer-2 behaves the same. No HTTP 451 or 503. No conversation entry is created under ~/.cursor/chats, so it seems to fail before the session starts.

Already ruled out:

  • CLI versions 2026.10.16-e3cb207 (worked on Oct 16), 2026.10.18-ea085cb, 2026.10.19-0506082: all hang
  • Fresh empty HOME / ~/.cursor: hangs
  • useHttp1ForAgent=true, agent set-channel static, explicit --api-key, stream-json output: no change
  • Plain HTTPS to agentn.global.api5.cursor.sh returns 200 over HTTP/2 in 0.07s
  • agent status: logged in; agent --list-models returns instantly
  • Codex CLI streaming from the same machine works fine (~4s reply)
  • Same account works on my Mac via a proxy
  • Couldn’t get a request_id: no --debug flag, and NODE_DEBUG=http2,tls prints nothing

Failed run timestamps for server-side lookup: 2026-10-20 01:28:30 UTC and ~01:30 UTC. Account: [email protected]
Could someone check whether agent streaming sessions from Grok Bot computer egress are being dropped or treated as a restricted region?

Steps to Reproduce

  1. On a Grok Bot computer, set CURSOR_API_KEY (agent status shows logged in)
  2. Run: cd /tmp && timeout 90 agent -p --trust --model grok-4.7-high “reply OK”
  3. Observe “Connection lost, reconnecting to agentn.global.api5.cursor.sh (attempt 1)” repeating, no output, exit 124 after 90s
  4. For comparison, run Codex CLI from the same machine: replies in ~4s

Operating System

Linux

Version Information

Cursor CLI 2026.10.19-0506082 (also reproduced on 2026.10.16-e3cb207 and 2026.10.18-ea085cb)
Environment: Grok Bot computer, Linux x64, egress via local tunnel 127.0.0.1:8791, ipinfo shows Ashburn, VA, US (AS54113 Fastly), no HTTPS_PROXY

Does this stop you from using Cursor

Yes - Cursor is unusable

Hey @Viking_Zhang!

This isn’t your account or a regional restriction. It’s scoped to that one Grok Bot computer’s network path, so the fastest fix is to refresh the computer:

  1. Fully quit Grok Bot and reopen it (on Mac, use Quit from the menu bar, not just closing the window).
  2. If it still loops, open Settings > Computer and run Update if one’s offered. It keeps your files and logins but reinstalls packages, so save or push anything unsynced and set the CLI back up afterward.

What each option keeps vs. removes: Grok Bot computer | Cursor Docs

If a fresh computer still loops, reply here and I’ll dig in.

Thanks @mohitjain. Skip the computer refresh. Cause was the CLI fetching [email protected]:cursor/plugins over SSH with no timeout while outbound port 22 is blocked here, so agent -p looked stuck on “Connection lost, reconnecting”. Fixed with git config --global url."https://github.com/cursor/".insteadOf for both [email protected]:cursor/ and ssh://[email protected]/cursor/. CLI replies OK again in about 5s. Same update is on ticket T-H90506.

Hey @Viking_Zhang,

You found it. Before each session, the CLI syncs your enabled marketplace plugins from GitHub and tries SSH first. With outbound SSH blocked on your Grok Bot computer, each SSH attempt waits about 30 seconds before it’s given up, the CLI doesn’t retry over HTTPS, and the wait repeats for every enabled plugin. That stall is what showed up as “Connection lost, reconnecting”.

This is a known issue we’re already tracking, and I’ve added your report to it. The blocked non-HTTPS traffic on your computer is likely a separate known issue with Grok Bot computers that the team is also tracking, so there’s no need to refresh or update the computer.

Your insteadOf rewrite is the right workaround for now. If you enable plugins from other GitHub repos, a broader rule covers those too:

git config --global url."https://github.com/".insteadOf "[email protected]:"
git config --global --add url."https://github.com/".insteadOf "ssh://[email protected]/"