Skip to content

pstack skills disappear in other repos/worktrees until reinstall (cache sha churn + per-window prune race) #789

Open

Description

@darkhan-nace

Symptom

pstack skills (/poteto-mode, /how, /bro, …) often don't show up in Cursor windows opened on other repos or git worktrees. Uninstalling and reinstalling pstack brings them back, until the next time. Other plugins from this monorepo (cursor-team-kit, gmail, google-calendar, google-drive, x) share the same cache key, so they are probably affected too. pstack is the one I notice because I use its slash commands all day.

Environment

  • Cursor 3.27.12 (also seen on 3.26.x), macOS, Apple silicon, Glass layout
  • pstack 0.15.30 from the cursor-public marketplace
  • Usually 2 or 3 windows open at once, each on a different repo or worktree

What the logs and local state show

  1. The cache key changes almost daily. Plugins from this repo are cached at ~/.cursor/plugins/cache/cursor-public/<plugin>/<monorepo commit sha>/. Over the last 6 days my windows picked up six different shas (d457567, ddf824a, 111cf6a, 190d287, d1453c1, 9b93e81), because any commit to the monorepo moves the pin, even one that only touches a third-party plugin.
  2. Every window installs at the same moment. When a new sha arrives, each open window logs loadFromMarketplaceSource: Plugin missing from cache, installing: pstack within the same second and clones into the same directory. On 2026-10-22 16:02:11 and 2026-10-23 18:42:08/12 this happened in 2 to 3 windows at once.
  3. Each load deletes the other versions. In cursor-agent-exec, after a plugin loads, pruneOldVersions({…, keepVersions:[e.version]}) removes every other sha directory. A window that loaded the previous sha keeps paths into a directory another window just deleted.
  4. A failed load leaves a plugin with no skills. On a load error, loadFromMarketplaceSource records the plugin with loadError and skills: []. It still counts as installed but shows no skills until the window reloads. I saw concurrent-install collisions on other marketplace plugins, logged as Cursor plugin load error: gmail@4bf3e08…: EEXIST: file already exists, mkdir …/.cursor-plugin, gmail@4bf3e08…: ENOENT … open …/.cache-complete, and agentmail@aebd765…: ENOENT … unlink …/.mcp.json in two windows in the same millisecond.
  5. The installed-plugin cache is stored per workspace. globalStorage/state.vscdb has one cursor.plugins.installedIds.<teamId>|<workspace uri> key per folder (54 for me), and every git worktree counts as a new workspace. The lists differ a lot: my main checkout has 17 plugin ids, while worktrees and repos I opened before installing have 4 to 8. The renderer hydrates this on window open (_hydrateInstalledPluginIdsFromStorage).
  6. Backend misses. marketplace listEnabledPlugins failed … treating source as unavailable appears 114 times in my logs over about 2 weeks. A window that opens during one loads no marketplace plugins at all until it reloads.

Likely cause

A per-window cache of a shared on-disk directory, a pin that moves daily, and prune-on-load, with no lock between windows. Whichever window installs or prunes first can leave the other windows with a deleted path or a half-written directory. Items 5 and 6 explain why it shows up in "some other repo" and not everywhere at once. I haven't caught the slash menu missing pstack in the same window as a logged error, so the exact trigger is inferred from logs and code, not observed.

Workaround

Developer: Reload Window (or a full quit) in the affected window usually brings the skills back without reinstalling.

Asks

  • Pin the cache per plugin (version or tree hash of pstack/) instead of the monorepo commit, so an unrelated commit doesn't force a reinstall.
  • Lock or atomically rename (tmp dir → final path) when installing into the cache, and don't prune a version another window still has loaded.
  • When a plugin load fails, retry or surface the error instead of silently keeping the plugin with skills: [].

Related: #136 (install, enable and cache lifecycle docs), #527 (disable-model-invocation and the / palette), and the forum thread on skills not showing until restart or a new repo.

Activity

  1. deanrie commented on Oct 23, 2026

    @deanrie

    Hey @darkhan-nace, thorough write-up, thanks. I checked the first point against this repo's history: all six shas you list are merge commits on main, and five of them (9b93e81 #778, d1453c1 #766, 190d287 #740, 111cf6a #739, ddf824a #725) touch only third_party/<one plugin>/, .cursor-plugin/marketplace.json and the README. pstack/ is byte-identical across them, so each of those reinstalls of pstack was triggered by a change to an unrelated connector. Only d457567 (#724) actually changed pstack. My own cache shows the same layout, one <monorepo sha> directory per plugin, all on 9b93e81 after pruning.

    The install, prune and installedIds logic lives in the app, not in this repo, so the fix for points 2 to 6 is on the Cursor side rather than something a plugin author can patch here. Two things that would sharpen it for whoever picks it up: the exact cursor-agent-exec log lines around one pruneOldVersions call (with the sha it kept and the shas it removed), and whether the window that lost its skills had logged a Cursor plugin load error for pstack specifically, or only for the other plugins you saw collide. You mention you have not caught the two together yet; if it happens, that pair of timestamps is the missing link.

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