Repository navigation
[Bug]: Source control (Azure DevOps): VcsProcessSpawnError on Windows because Node child_process.spawn cannot resolve az.cmd #2576
Description
Before submitting
- I searched existing issues and did not find a duplicate.
- I included enough detail to reproduce or investigate the problem.
Area
apps/desktop
Steps to reproduce
- Install Azure CLI 2.86.0 on Windows; verify
az --versionworks in cmd.exe. - Install the
azure-devopsextension and runaz login; verifyaz repos pr list --detect true --top 1 --output jsonworks in cmd.exe inside an ADO repo. - Open T3 Code.
- Click the "Create PR" button.
- Server log shows
Source control provider azure-devops failed in listChangeRequests: VcsProcessSpawnErrorfollowed byVCS process failed to spawn in AzureDevOpsCli.execute: az repos pr list --detect true --source-branch <branch> --status active --top 1 --only-show-errors --output json (<cwd>). The Create PR flow never opens. - Outside T3 Code:
node -e "require('child_process').spawnSync('az', ['--version'], {stdio:'inherit'})"fails silently withspawn az ENOENT; same call with{shell:true}works (Node 22+ also printsDEP0190deprecation).
Expected behavior
On Windows, T3 Code resolves az (and any other .cmd/.bat-shimmed CLI such as gh, glab, npm) the same way cmd.exe does — by consulting PATHEXT and falling through to az.cmd. Source control discovery for Azure DevOps succeeds when az + the azure-devops extension are installed and authenticated.
Actual behavior
On Windows, every spawn of az fails before the child process starts. T3 Code surfaces a generic VcsProcessSpawnError with no install hint, even though az is on PATH and works in cmd.exe / PowerShell. The reactive error classifier in AzureDevOpsCli.ts ("command not found: az", "enoent", etc.) never runs because the failure happens at the child_process.spawn boundary inside the Effect platform-node spawner, not inside az itself. Result: Azure DevOps integration is completely unusable on Windows hosts.
Impact
Major degradation or frequent failure
Version or commit
main @ f4c9418
Environment
Windows 11 Pro, T3 Code Alpha v0.0.22, Node v24.11.1
Logs or stack traces
Source control provider azure-devops failed in listChangeRequests: VcsProcessSpawnError
VCS process failed to spawn in AzureDevOpsCli.execute: az repos pr list --detect true --source-branch <branch> --status active --top 1 --only-show-errors --output json (<cwd>)
Reproduction outside T3 Code (Node only):
> node -e "const r = require('child_process').spawnSync('az', ['--version']); console.log(JSON.stringify({status: r.status, error: r.error && r.error.message, stderr: r.stderr.toString()}, null, 2))"
{
"status": null,
"error": "spawn az ENOENT",
"stderr": ""
}
> node -e "const r = require('child_process').spawnSync('az', ['--version'], {shell: true}); console.log(JSON.stringify({status: r.status, stdoutSnippet: r.stdout.toString().slice(0,40)}, null, 2))"
(node:50260) [DEP0190] DeprecationWarning: Passing args to a child process with shell option true can lead to security vulnerabilities, as the arguments are not escaped, only concatenated.
{
"status": 0,
"stdoutSnippet": "azure-cli 2.86.0"
}Screenshots, recordings, or supporting files
Workaround
No response
Activity