[BUG] IDE extension auto-install downgrades the extension (2.1.281 → 2.1.89) in Windsurf: --force --install-extension without a version

Status Open
Reported on v2.1.281
Maintainer reply None cached
Activity 0 comments · opened Sep 25, 2026

What's wrong

The CLI's IDE-extension auto-install downgrades the extension in Windsurf (Remote-SSH): 2.1.281 → 2.1.89, repeatedly.

When claude starts in an IDE terminal, it compares the installed extension version (<ide> --list-extensions --show-versions) with the CLI version. If the extension is older, it runs:

<ide> --force --install-extension anthropic.claude-code

This asks for no version and trusts whatever the marketplace calls "latest". --force then lets that result replace a newer installed version.

Windsurf's marketplace (marketplace.windsurf.com/vscode/gallery) answers a latest-version-only query (flag IncludeLatestVersionOnly) with 2.1.89, targetPlatform universal. It gives that answer for every targetPlatform (tested with linux-x64, win32-x64, universal, and none). 2.1.89 is the last universal build; every later release is platform-specific. The same marketplace does list 2.1.281 linux-x64 when asked for all versions.

So the extension ends up on 2.1.89, which is about 190 releases older than the CLI. It stays there because the next CLI start sees 2.1.89 < CLI version and runs the same install again.

Evidence (remote server ~/.windsurf-server/data/logs/<session>/remoteagent.log)

07:33:36 Installing extension: anthropic.claude-code {"version":"2.1.281","installGivenVersion":true,"pinned":true,...}
07:34:00 Renamed to .../anthropic.claude-code-2.1.281-linux-x64
          (CLI 2.1.282 started in an IDE terminal; IDE WebSocket connected 07:47:40)
07:47:42 Installing extension: anthropic.claude-code {"isMachineScoped":true,"installGivenVersion":false,...}
07:47:46 Renamed to .../anthropic.claude-code-2.1.89-universal
07:47:46 Marked extension as removed anthropic.claude-code-2.1.281-linux-x64

The same sequence happened on another day, when 2.1.276 was replaced by 2.1.89-universal.

Gallery query that reproduces the marketplace side:

curl -s -X POST https://marketplace.windsurf.com/vscode/gallery/extensionquery \
  -H 'Content-Type: application/json' -H 'Accept: application/json;api-version=3.0-preview.1' \
  -d '{"filters":[{"criteria":[{"filterType":7,"value":"anthropic.claude-code"},{"filterType":15,"value":"linux-x64"}],"pageSize":1}],"flags":950}'
# -> versions: [("2.1.89","universal")]

Why this is a Claude Code bug, not only a Windsurf one

The marketplace answer is wrong, but the CLI turns it into a downgrade. --force without a version tells the IDE to replace a newer extension with whatever the marketplace returns. Any IDE marketplace that lags or misresolves (Windsurf, Open VSX forks, Cursor) can cause the same regression.

A lag of one release alone also retriggers the install on every CLI start: the CLI is 2.1.282 while Windsurf's newest linux-x64 build is 2.1.281.

Suggested fixes

  • Install an explicit version: --install-extension anthropic.claude-code@<CLI version>. If that version doesn't exist, fall back to the newest available version that is ≥ the installed one.
  • Never downgrade. Skip the install, or check the result and restore the previous version, if the resolved version is older than the installed one.
  • Consider not passing --force when an extension is already installed.

Workaround

Set CLAUDE_CODE_IDE_SKIP_AUTO_INSTALL=1 in the env block of ~/.claude/settings.json (or autoInstallIdeExtension: false). Then install a pinned version with windsurf --install-extension anthropic.claude-code@2.1.281 --force.

Environment

  • Claude Code CLI 2.1.282 (native install), Linux x64 remote
  • Windsurf, Remote-SSH, Windows client; remote server product version 1.110.1
  • Extension affected: anthropic.claude-code 2.1.281 linux-x64 → 2.1.89 universal

View original on GitHub ↗