Skip to content
Source
Sign inSign up
pingdotgg/t3code

[Bug]: Cursor provider freezes on "Starting Cursor" for several minutes (up to 7–9m) when starting threads or subagents #40503

ClosedAnish713(GitHub profile, opens in a new tab) opened this issue 5 comments

What happened

When starting a Cursor subagent (e.g. for gap finding or implementation) or a new top-level thread with Cursor models (including Grok 4.7, Composer 2.5, etc.), T3 Code displays "Starting Cursor" and remains stuck for several minutes (up to 7–9 minutes). Toggling Fast mode on or off does not reduce or affect this delay. After the prolonged startup wait, the run eventually begins and finishes thinking and generation normally. Other providers (such as Qoder or Claude) start quickly in seconds.

Diagnosis

In packages/provider-cursor/src/server/CursorAgentSdk.ts, T3 Code emits run.start immediately prior to calling @cursor/sdk's agent.send(message, options). The run.started event is emitted only after agent.send resolves to return the active Run handle.

In server.trace.ndjson, the span CursorAgentSdkSession.send remains blocked for hundreds of seconds (for example, 466.8s in thread 7159ca95). Across 19 historical runs of grok-4.7, the delay between outgoing run.start and incoming run.started was consistently between 461.8s and 468.2s (~465.5s average / ~7m 45s). Historical runs with composer-2.5 also show multi-minute stalls between run.start and session progress.

Local operations (inspectCursorSkills at 0.2s, runner.open at 1.5s) execute quickly. The block occurs inside @cursor/sdk (v1.3.1) during sendImpl() / executor.run() while establishing the session handshake and RPC stream to Cursor's cloud infrastructure.

Because agent.send blocks asynchronously for minutes without intermediate progress callbacks, the UI remains indefinitely on "Starting Cursor" with no diagnostic feedback or connection timeout handling.

Steps to reproduce

  1. In T3 Code desktop, configure the Cursor provider.
  2. Open a project and create a new thread or spawn a subagent with a Cursor model (e.g. Grok 4.7 or Composer 2.5, in Standard or Fast mode).
  3. Send a message (or delegate a task).
  4. Observe that the UI stays stuck on "Starting Cursor" for several minutes (up to 7–9 minutes) before run.started arrives and streaming begins.

Version

0.1.11 (59651c1761f6)

Environment

macOS (Darwin 27.2.0 arm64), Node v26.13.1, @cursor/sdk 1.3.1

Evidence

[2026-11-21T18:51:09.319Z] NTIVE: {"provider":"cursor","protocol":"cursor-agent-sdk.local","kind":"protocol","event":{"direction":"outgoing","stage":"decoded","payload":{"type":"run.start","options":{"model":{"id":"grok-4.7","params":[{"id":"fast","value":"true"},{"id":"reasoning_effort","value":"high"}]}}}}}
... (466.788s stall inside CursorAgentSdkSession.send / agent.send) ...
[2026-11-21T18:58:56.107Z] NTIVE: {"provider":"cursor","protocol":"cursor-agent-sdk.local","kind":"protocol","event":{"direction":"incoming","stage":"decoded","payload":{"type":"run.started","runId":"run-***"}}}

Historical Cursor start latencies (run.start -> run.started):
2026-11-21T05:01:55Z | grok-4.7       | 461.8s
2026-11-21T05:21:23Z | grok-4.7       | 466.0s
2026-11-21T05:22:07Z | grok-4.7       | 465.5s
2026-11-21T05:33:24Z | grok-4.7       | 465.8s
2026-11-21T09:08:34Z | grok-4.7       | 468.2s
2026-11-21T13:45:14Z | grok-4.7       | 464.6s
2026-11-21T18:29:29Z | composer-2.5   | >132s (interrupted before run.started)
2026-11-21T18:51:09Z | grok-4.7(fast) | 466.8s

None found for Cursor SDK session send startup freeze across Cursor models.

Fix applied or workaround

Use subagents from other providers (e.g. Qoder or Claude) which start immediately, or reuse warm threads rather than spawning fresh Cursor sessions.

Filed by

Antigravity via t3 triage

  1. tanstack-source added labelsbug

  2. @Anish713 Can you run a bare @cursor/sdk script outside T3 Code, in the same project folder on the same machine (Agent.create({ apiKey, model: { id: 'grok-4.7' }, local: { cwd: '' } }), then await agent.send('hi'))? Does agent.send also take about 7¾ minutes to return, and does it still take that long when cwd is an empty folder?

  3. juliusmarminge added labelsneeds more info

  4. @juliusmarminge Ran a bare @cursor/sdk 1.3.1 script outside T3 Code on the same machine (Node v26.13.1, macOS arm64), model grok-4.7, prompt hi.

    Project folder: Agent.create 3.4s, agent.send 4.5s, run.wait 3.1s (total 11.0s). Empty folder: Agent.create 17.7s, agent.send 4.0s, run.wait 4.0s (total 25.7s).

    So agent.send does not take ~7m 45s on its own, and an empty cwd does not reproduce it either. The ~465s gap between run.start and run.started shows up only inside T3 Code.

  5. juliusmarminge removed labelsneeds more info

  6. @Anish713 Could you rerun your bare @cursor/sdk script with the options T3 Code passes: Agent.create({ apiKey, model: { id: 'grok-4.7' }, local: { cwd: '<your project>', settingSources: ['user', 'team', 'mdm', 'plugins'], enableAgentRetries: true } }), then await agent.send('hi')? Does agent.send then take about 465s, and if it does, does it drop back to a few seconds when you remove 'plugins' or 'team' from settingSources, or temporarily move ~/.cursor/mcp.json aside?

  7. juliusmarminge added labelsneeds more info

  8. Anish713(GitHub profile, opens in a new tab)commented

    @juliusmarminge Reran the bare @cursor/sdk 1.3.1 script with Agent.create({ apiKey, model: { id: 'grok-4.7' }, local: { cwd: '', settingSources: ['user', 'team', 'mdm', 'plugins'], enableAgentRetries: true } }) and await agent.send('hi').

    agent.send took 229.6s here, not ~465s. Removing plugins dropped it to 3.5s. Removing team while keeping plugins stayed slow at 282.9s. ~/.cursor/mcp.json does not exist here as I use claude for most works, so that file was not moved.

    Both slow runs logged local-plugins-bootstrap failing to install redis-development from cursor-public (ENOENT on skills/redis-development) before agent.send returned. After uninstalling that plugin from cursor-public marketplace, the same full options call returned in 5.2s with no plugin install error.

    T3 Code's own provider logs match that. Before the uninstall, 19 Grok 4.7 runs took 442–468s from run.start to run.started (median 465.5s), and the last DeepSeek V4.1 Flash run took 465.2s. After the uninstall, with settingSources still including plugins, Composer 2.5 started in 4.5s and Grok 4.7 in 4.8s.

    This delay is in @cursor/sdk, not in T3 Code. The same agent.send stall happens in a bare SDK script outside T3 Code, and it disappears when that Cursor plugin is uninstalled. T3 Code is only waiting for agent.send to return. I am not sure if anything can be done here in t3code itself? besides workaround of uninstalling that error skill from cursor's marketplace.

  9. juliusmarminge removed labelsneeds more info

  10. cc @Yash-Singh1 for cursor related stuff

Sign in to join this conversation.