-
Notifications
You must be signed in to change notification settings - Fork 399
Description
- VSCode Version: 1.106.0 and 1.106.1 (works correctly in 1.105.1)
- Local OS Version: Windows (client),
- Remote OS Version: RHEL 9 (remote host),
- Remote Extension/Connection Type: Rocky Linux 9 (container)
- Logs:
Steps to Reproduce:
Does this issue occur when you try this locally?: No, this is specific to the remote SSH + Dev Container setup
Description
Automatic tasks with "runOn": "folderOpen" fail with a trust error when they create new terminal instances in a Dev Container accessed via Remote-SSH. This is a regression introduced in VS Code 1.106.0 - the same setup works perfectly in 1.105.1.
Setup
Client: VS Code on Windows
Remote: RHEL 9 workstation (via Remote-SSH)
Container: Rocky Linux 9 Docker container (via Dev Containers)
Configuration: Using Docker Compose with custom workspace mounts to maintain path parity between host and container
Steps to Reproduce
Connect to remote host via SSH
Open folder in Dev Container (using Docker Compose)
Have tasks with "runOn": "folderOpen" configured in .vscode/tasks.json
Tasks are configured with "task.allowAutomaticTasks": "on" in workspace settings
Expected Behavior
Automatic tasks should execute when the folder opens, as they do in VS Code 1.105.1.
Actual Behavior
Tasks fail with the error:
The terminal process failed to launch:
Cannot launch a terminal process in an untrusted workspace with cwd \home\u2434235\dockerhome\servotop\servo and userHome \home\u2434235.
Key Observations
Manual tasks always work - Running the exact same task manually (via Command Palette or Task Explorer) succeeds every time
Timing-independent - The error occurs even when tasks are triggered long after container initialization completes
Shell reuse pattern - Tasks that reuse an existing terminal succeed, but tasks that create a new terminal fail
Only affects runOn: folderOpen - Tasks without this option work perfectly in new terminals
Configuration is correct - "task.allowAutomaticTasks": "on" is set in workspace settings
Intermittent on first run - Sometimes automatic tasks work initially, but subsequent automatic tasks consistently fail when creating new terminals
Diagnostic Information
Paths are correct (all using forward slashes):
PWD: /home/u2434235/dockerhome/servotop/servo
HOME: /home/u2434235
WORKSPACE: /home/u2434235/dockerhome/servotop/servo
Configuration:
task.allowAutomaticTasks is set to "on" in .vscode/settings.json
workspaceFolder is set to "${localWorkspaceFolder}" in devcontainer.json
No tasks.json.trust file is created (might be related to the bug)
Workaround
Downgrading to VS Code 1.105.1 completely resolves the issue.
Configuration Files
devcontainer.json:
json{
"name": "Dev Container",
"dockerComposeFile": "docker-compose.yml",
"service": "dev",
"workspaceFolder": "${localWorkspaceFolder}",
"customizations": {
"vscode": {
"settings": {
"task.allowAutomaticTasks": "on"
}
}
}
}
tasks.json (example failing task):
json{
"version": "2.0.0",
"tasks": [
{
"label": "Example Task",
"type": "shell",
"command": "echo 'test'",
"runOptions": {
"runOn": "folderOpen"
}
}
]
}
.vscode/settings.json:
json{
"task.allowAutomaticTasks": "on"
}
Impact
This regression breaks automatic task workflows for developers using multi-layer remote setups (SSH + containers), which is a common enterprise development pattern.
Version Comparison
1.105.1: ✅ Works perfectly
1.106.0: ❌ Fails with trust error
1.106.1: ❌ Fails with trust error
This strongly suggests a regression was introduced in the 1.106.0 release related to workspace trust handling for automatic tasks in remote+container scenarios.