wta.exe launch fails with 0x80070002 — misplaced quote in path breaks at "Program Files" (Windows, codex agent)
Nadie ha tomado este issue todavía.
- Lenguaje dominante
- Shell
- Estrellas
- 11.2k
- Forks
- 1.9k
- Merge medio
- 14 h 16 min
- PR fusionados (30 d)
- 6
Descripción
Environment
- OS: Windows 11 (build 26100)
- Copilot CLI: 1.0.80 (npm
@github/copilot@1.0.80, platform packagecopilot-win32-x64) - Intelligent Terminal:
Microsoft.IntelligentTerminal0.2.2192.0 (installed via MS Store, package status Ok,wta.exepresent and intact — 24,870 KB)
Bug
When spawning a delegated codex agent (--delegate-agent codex), the terminal launch fails with:
error 2147942402 (0x80070002) when launching `C:\Program "Files\WindowsApps\Microsoft.IntelligentTerminal_0.2.2192.0_x64__8wekyb3d8bbwe\wta.exe --connect-master \\.\pipe\wta-master-<GUID> --owner-tab-id {<GUID>} --owner-window-id 1 --agent npx" -y "@agentclientprotocol/codex-acp@1.1.4 --agent-id codex --agent-source host --follows-global-acp-model --allowed-agent-ids copilot,claude,codex,gemini,opencode --delegate-agent codex --language en-US --start-stashed"
The system cannot find the file specified.
Root cause
The command line is assembled with a misplaced quote: C:\Program "Files\WindowsApps\... — the quote opens after Program instead of before C:\. Windows then treats C:\Program as the executable path, which does not exist → 0x80070002 (ERROR_FILE_NOT_FOUND).
The closing quote appears after --agent npx, so the intended quoting was presumably:
"C:\Program Files\WindowsApps\...\wta.exe" --connect-master ... --agent "npx" -y "..." ...
Reproducibility
- Reproduces 100% on every codex agent spawn, including after a full reboot
- Survives: forced reinstall of Microsoft.IntelligentTerminal from the Store, and npm update of @github/copilot (1.0.79 → 1.0.80)
wta.exelaunches fine when run directly from PowerShell — the exe and package are healthy; only the command construction is broken
Workaround
Use non-codex agents (copilot/claude/gemini work), since the faulty quoting appears specific to the codex delegate path.
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Línea de trabajo
Sigue la ruta de delegación de codex que construye el comando de lanzamiento de wta.exe en Windows, comenzando por el punto de entrada de construcción de comandos para agentes delegados. Reproduce el problema con un agente de codex en Windows y verifica que la ruta del ejecutable esté entre comillas como una sola ruta y que el spawn se realice correctamente sin 0x80070002.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- node.js, shell
- Área
- cli, operating-systems
- Tipo de issue
- Error
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Estado de actividad
- Activo
- Claridad
- Bastante claro
- Aptitud para principiantes
- 55/100