Skip to content

[Bug]: Cursor threads block for minutes on run.start whenever a marketplace plugin updates — SDK worker does full (non-sparse) git clones of each plugin's whole repo #42127

Done

Description

@DavidShawa

Before submitting

  • I searched existing issues and did not find a duplicate.
  • I included enough detail to reproduce or investigate the problem.

Related but different: #40503 (closed). There the stall came from a Cursor plugin that failed to install. Here every plugin installs fine; each install is just a full shallow clone of the plugin's whole GitHub monorepo. On a slow link to GitHub, that holds run.start for minutes every time a marketplace plugin gets a new revision.

Area

Provider: Cursor (local @cursor/sdk worker, __cursor-sdk-worker)

Steps to reproduce

  1. Enable a few Cursor marketplace plugins on the Cursor account. Several of them should come from the same repo, for example gmail, outlook, x and pstack from github.com/cursor/plugins, plus stripe from github.com/stripe/ai.
  2. Use a machine with slow throughput to GitHub. Mine is about 30–550 KB/s and varies a lot.
  3. Wait until any enabled plugin gets a new revision, so the matching ~/.cursor/plugins/cache/cursor-public/<plugin>/<sha>/ is missing or has no .cache-complete.
  4. Start a Cursor thread in T3 Code. Any model works; I used grok-4.7.

Expected behavior

The thread starts in a few seconds, the same as starting a chat in the Cursor app or cursor-agent on the same machine and network. Updating a plugin should not hold the run for minutes. If it must, T3 should show that it is installing plugins.

Actual behavior

agent.opened arrives in 2–13 s. After that, run.start gets no response until every changed plugin has been fetched. The thread shows nothing during that wait.

Provider event logs (logs/provider/events.<thread>.log):

# plugin update pending
12:18:23.363 outgoing agent.open
12:18:27.942 incoming agent.opened
12:18:27.985 outgoing run.start
12:22:21.951 incoming run.started      <- 3m54s blocked on plugin installs

# same machine a few minutes later, after all plugin caches were complete
12:25:05.603 outgoing agent.open
12:25:07.768 incoming agent.opened
12:25:07.787 outgoing run.start
12:25:15.571 incoming run.started      <- 7.8s

An earlier thread got no reply at all for 3m16s and then 2m26s, so the user closed it and retried.

While the run is blocked, the worker runs the SDK's direct-install path for each plugin:

__cursor-sdk-worker
 └─ git -c credential.interactive=false -c core.fsmonitor=false fetch --depth 1 origin <sha>
      cwd: $TMPDIR/backend-plugin-XXXXXX   remote: https://github.com/stripe/ai
      └─ git index-pack --stdin --fix-thin ...   (stalled at ~11 MB, 0% CPU, no progress for minutes)

What I saw:

  • Full-repo fetch for a small plugin. The stripe plugin is 560 KB on disk, but the install pulls a --depth 1 snapshot of the whole stripe/ai repo (more than 11 MB before it stalled). It does the same with cursor/plugins for gmail, outlook, x and pstack.
  • One fetch per plugin, repeated across agents. Each plugin re-fetches the same repo and commit. Every new agent open or retry starts another fetch. I saw 3 git fetch processes at once for the same cursor/plugins@ca782ed8…, each in its own backend-plugin-* temp dir, splitting the same slow link.
  • No timeout. The direct-install path passes no timeoutMs when sparsePluginClones is off.
  • Orphaned fetches. After agent.close, the agent's git fetch kept running. One ran for more than 4 minutes after its agent closed, and its backend-plugin-* temp dir was left behind.

Root cause (from the bundled SDK code)

In the bundled @cursor/sdk, loadPluginBootstrapOutputs builds the marketplace clients with marketplaceOptions ?? Ds6({dashboardTransport, workspacePath, userHomeDirectory}). The default factory creates the JO1 marketplace clients without sparsePluginClones, so it is false. installFromEntryUrls then falls through to Jw6, which creates backend-plugin-*, does a full git fetch --depth 1 origin <sha> plus checkout with no timeout, and copies gitPath into the cache.

The cursor-agent CLI (2026.11.05-86047df) builds the same clients with sparsePluginClones: !0 plus extraGitConfig and awaitAuthReady. That path uses --filter=blob:none --sparse, materializes only the plugin's directory, reuses ~/.cursor/plugins/marketplaces, and has timeouts. Both write to the same ~/.cursor/plugins/cache. This is why the Cursor app and CLI start quickly on the same network while T3 blocks for minutes.

There is no T3 setting to opt out: settingSources is always ["project","user","team","mdm","plugins"].

Suggested fixes

  1. Get sparse plugin clones into the SDK worker. Either pass marketplaceOptions with sparsePluginClones: true if the SDK supports it, or ask Cursor to make sparse the default for SDK local agents, matching cursor-agent.
  2. Don't block a run on plugin updates when an older cached version exists. Start with the cached version and update in the background.
  3. Deduplicate plugin installs for the same repo and commit within the worker.
  4. Kill plugin git child processes and remove their backend-plugin-* dirs when the agent that started them closes.
  5. Show a status such as "Installing Cursor plugins (2/4)…" instead of a silent wait.
  6. Optionally, add a setting to leave plugins out of settingSources for Cursor threads.

Impact

Major degradation. Whenever any enabled marketplace plugin gets a new revision, every new Cursor thread stalls for 2–8 minutes, or never starts if the fetch stalls. Retrying makes it worse because each retry adds another parallel fetch.

Version or commit

T3 Code (Nightly) 0.1.12-nightly.20261124.5178

Environment

macOS (Apple Silicon), slow GitHub throughput through a system proxy (~30–550 KB/s). Cursor provider, model grok-4.7.

Workaround

  • Once every plugin's cache is complete, threads start in about 10 s until the next plugin update.
  • Uninstalling unused marketplace plugins reduces how often it happens.
  • Running cursor-agent once after a plugin update should pre-fill the shared cache with the faster sparse path, but I have not verified this.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions