github / github/copilot-cli

wta.exe launch fails with 0x80070002 — misplaced quote in path breaks at "Program Files" (Windows, codex agent)

オープン
#4,540 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

area:agents area:platform-windows
主要言語
Shell
スター
11.2k
フォーク
1.9k
平均マージ
14時間 16分
マージ済み PR(30日)
6

説明

Environment

  • OS: Windows 11 (build 26100)
  • Copilot CLI: 1.0.80 (npm @github/copilot@1.0.80, platform package copilot-win32-x64)
  • Intelligent Terminal: Microsoft.IntelligentTerminal 0.2.2192.0 (installed via MS Store, package status Ok, wta.exe present 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.exe launches 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.

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

委譲されたエージェント向けのコマンド構築エントリポイントから開始して、Windows の wta.exe 起動コマンドを構築する codex 委譲パスを追跡します。Windows 上の codex エージェントで再現し、実行可能ファイルのパスが 1 つのパスとして引用符で囲まれ、0x80070002 なしで spawn が成功することを確認します。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
node.js, shell
領域
cli, operating-systems
issue の種類
バグ
難易度
3/5
見積もり時間
1〜2日
活発さ
活発
明瞭さ
おおむね明確
初心者へのやさしさ
55/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。