Skip to content

Workspace trust doesn't work in VS Code 1.106.0 #277808

@JVApen

Description

@JVApen

Does this issue occur when all extensions are disabled?: N/A

  • VS Code Version: 1.106.0
  • OS Version: Local: Windows_NT x64 10.26100

Steps to Reproduce:

  1. Use VS Code on Windows to remotely connect to a Linux device.
  2. On the device, have following tasks in the workspace:
      {
         "label": "Initialize launch.json",
         "type": "shell",
         "windows": {
            "command": "if (! (Test-Path \\\".vscode/launch.json\\\" -PathType Leaf)) { Copy-Item \\\".vscode/launch.json.windows\\\" -Destination \\\".vscode/launch.json\\\" }",
         },
         "linux": {
            "command": "if [ ! -f .vscode/launch.json ]; then cp .vscode/launch.json.linux .vscode/launch.json; fi",
         },
         "group": "none",
         "presentation": {
            "reveal": "never",
            "revealProblems": "onProblem",
            "close": true,
            "panel": "dedicated"
         },
         "runOptions": {
            "runOn": "folderOpen"
         },
         "problemMatcher": []
      },
  1. Open the workspace
  2. Notice the task keeps hanging, following notifications appears;
The terminal process failed to launch: Cannot launch a terminal process in an untrusted workspace with cwd \workspaces and userHome \home\coder.
  1. Note that the path separators are using \ instead of /

Enabling trace logging gives the following in terminal:

2025-11-17 11:01:17.549 [trace] [91b0b07] terminalMultiLineLinkDetector#detect text [" *  Executing task: if [ ! -f .vscode/launch.json ]; then cp .vscode/launch.json.linux .vscode/launch.json; fi "]
2025-11-17 11:01:17.550 [trace] [91b0b07] terminalLocalLinkDetector#detect text [" *  Executing task: if [ ! -f .vscode/launch.json ]; then cp .vscode/launch.json.linux .vscode/launch.json; fi "]
2025-11-17 11:01:17.551 [trace] [91b0b07] terminalLocalLinkDetector#detect parsedLinks [[{"path":{"index":30,"text":".vscode/launch.json"}},{"path":{"index":61,"text":".vscode/launch.json.linux"}},{"path":{"index":87,"text":".vscode/launch.json"}}]]
2025-11-17 11:01:17.551 [trace] [91b0b07] terminalLinkHelpers#updateLinkWithRelativeCwd cwd ["\\workspaces"]
2025-11-17 11:01:17.552 [trace] [91b0b07] terminalLocalLinkDetector#detect linkCandidates [["/WINDOWS/system32/\\workspaces/.vscode/launch.json"]]
2025-11-17 11:01:17.553 [trace] [91b0b07] terminalUriLinkDetector#detect computedLinks [[]]
2025-11-17 11:01:17.609 [trace] [91b0b07] terminalLinkHelpers#updateLinkWithRelativeCwd cwd ["\\workspaces"]
2025-11-17 11:01:17.610 [trace] [91b0b07] terminalLocalLinkDetector#detect linkCandidates [["/WINDOWS/system32/\\workspaces/.vscode/launch.json.linux"]]
2025-11-17 11:01:17.668 [trace] [91b0b07] terminalLinkHelpers#updateLinkWithRelativeCwd cwd ["\\workspaces"]
2025-11-17 11:01:17.669 [trace] [91b0b07] terminalLocalLinkDetector#detect linkCandidates [["/WINDOWS/system32/\\workspaces/.vscode/launch.json"]]

Metadata

Metadata

Assignees

Labels

WSLIssue when using WSLbugIssue identified by VS Code Team member as probable bugterminal-processProblems launching processes, managing ptys, exiting, process leaks, etc.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions