Skip to content

Fix customization file resolution errors for remote agent host sessions#305767

Merged
roblourens merged 1 commit intomainfrom
roblou/compact-goldfish
Mar 27, 2026
Merged

Fix customization file resolution errors for remote agent host sessions#305767
roblourens merged 1 commit intomainfrom
roblou/compact-goldfish

Conversation

@roblourens
Copy link
Copy Markdown
Member

When a remote agent host session is active, SessionsAICustomizationWorkspaceService.getActiveProjectRoot() returns the session's repository URI, which is a vscode-agent-host:// URI. The AgenticPromptFilesLocator then uses this as a workspace folder root and tries to resolve .github/prompts and .github/hooks against it, causing errors like:\n\n\nFailed to resolve files at location: vscode-agent-host://localhost__8080/file/-/datadrive2/debugtest/.github/prompts No connection for authority: localhost__8080\n\n\nThe fix filters out AGENT_HOST_SCHEME URIs in both the activeProjectRoot derived observable and the getActiveProjectRoot() getter, so the project root returns undefined for remote sessions — consistent with the existing guard in WorkspaceFolderManagementContribution.\n\n(Written by Copilot)"

Copilot AI review requested due to automatic review settings March 27, 2026 18:28
@vs-code-engineering vs-code-engineering bot added this to the Backlog milestone Mar 27, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes AI customization file discovery in the Sessions window when the active session is backed by a remote agent host, by preventing vscode-agent-host:// URIs from being treated as a workspace root (which causes .github/prompts / .github/hooks resolution failures).

Changes:

  • Filter out AGENT_HOST_SCHEME (vscode-agent-host) in the activeProjectRoot derived observable.
  • Apply the same filtering in the getActiveProjectRoot() getter for consistency with observable consumers.

@roblourens roblourens marked this pull request as ready for review March 27, 2026 19:39
@roblourens roblourens enabled auto-merge (squash) March 27, 2026 19:39
@roblourens roblourens merged commit b7be16b into main Mar 27, 2026
22 checks passed
@roblourens roblourens deleted the roblou/compact-goldfish branch March 27, 2026 20:02
@roblourens roblourens restored the roblou/compact-goldfish branch March 27, 2026 21:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants