Skip to content

Agent config loading falls back to config.json on Windows host with WSL remote #10450

@shanevcantwell

Description

@shanevcantwell

Bug Description

When VS Code runs on Windows host with a WSL remote workspace (extensionKind: ["ui", "workspace"]), selecting an agent config from .continue/agents/ fails with:

Failed to parse config.json: Error: ENOENT: no such file or directory, open 'C:\Users\<user>\.continue\config.json'

Root Cause

In core/config/profile/doLoadConfig.ts, when an agent config is selected:

  1. overrideConfigYamlByPath is a WSL file URI (e.g., vscode-remote://wsl+Ubuntu/home/...)
  2. localPathOrUriToPath() on the Windows host can't resolve this to a local path
  3. fs.existsSync(configYamlPath) returns false
  4. Falls through to the deprecated loadContinueConfigFromJson() path
  5. getConfigJsonPath() resolves to C:\Users\<user>\.continue\config.json via os.homedir() → ENOENT

Fix

LocalProfileLoader already has the agent file's content available in overrideAssistantFile.content, but doesn't pass it through to the PackageIdentifier. PR #9739 added a content field to PackageIdentifier and a bypass in RegistryClient.getContent() for exactly this scenario.

The fix is to:

  1. Pass content in the packageIdentifier from LocalProfileLoader
  2. Check for pre-read content in doLoadConfig before the fs.existsSync gate

Same class of issue as #6242, #7810 (fixed in #9739) and #9661 (fixed in #9679).

Environment

  • VS Code on Windows with WSL remote workspace
  • Continue v1.3.31 pre-release (also affects v1.2.15 stable)
  • Agent config file in .continue/agents/

Metadata

Metadata

Assignees

Labels

area:configurationRelates to configuration optionside:vscodeRelates specifically to VS Code extensionkind:bugIndicates an unexpected problem or unintended behavioros:windowsHappening specifically on Windows

Type

No type

Projects

Status

Todo

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions