[Windows 11][Codex CLI/VS Code] Shell execution times out in one repository, succeeds in sibling workspace

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

メンテナーはふだん 1 日以内に返信

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

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
28/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
powershell, rust

調査の方向性

Start by tracing Windows sandbox workdir initialization, subprocess creation, and command output delivery; the issue does not identify source files or tests. Compare the failing repository with the sibling workspace and empty directory, and inspect sandbox logs for a supported diagnostic that isolates the failure. Done means identifying a reproducible cause or actionable diagnostic or repair that preserves sandbox protection.

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

説明

bug CLI sandbox tool-calls windows-os
Environment
  • Windows 11 Pro x64, build 26200; Windows PowerShell 5.1
  • VS Code 1.147.0
  • Codex VS Code extension 26.51120.50957 (previously 26.51120.41243)
  • Bundled CLI: codex-cli 0.171.0-alpha.13.2
  • Windows sandbox: restricted filesystem/network, approval OnRequest; sandbox logs report unelevated
  • Both workspaces are sibling local Git repositories on the same NTFS volume.
Bug

Codex cannot execute or return output from even trivial local commands when the workdir is one particular repository. The same commands succeed inside Codex when opened in another sibling repository under the same parent folder, and in a new empty diagnostic directory. Ordinary PowerShell executes Git and file reads normally in the failing repository.

Reproduction and A/B observations
  1. Open repository A in a fresh VS Code window/new Codex conversation.
  2. Request Get-Location; stdout empty, no useful stderr, command times out and is interrupted (exit code 1 reported).
  3. Invoke C:\Windows\System32\cmd.exe /d /c cd directly using Codex execution (not PowerShell-wrapped): same timeout/empty stdout and stderr.
  4. Open repository A's docs subdirectory as a separate workspace: Get-Location likewise times out.
  5. Open sibling repository B in C:\Oakrose\dev\: Get-Location succeeds and prints its path. Also succeeds in an empty diagnostic directory.
  6. From the working diagnostic workspace, set the tool workdir directly to repository A: Get-Location times out.
  7. With VS Code closed out of the execution path, run the bundled CLI from a regular PowerShell using codex exec --sandbox read-only --ephemeral --cd <repository A> and ask for one Get-Location command. The agent turn exits 0 but reports empty command output; this is not proof that the command succeeded.
  8. A structured codex exec --json --ephemeral --sandbox read-only --cd <repository A> diagnostic recorded one command_execution item.started and no item.completed event in the script's parser; item.failed events were not inspected, so the command's actual result remains unconfirmed.
Diagnostic evidence
  • Sandbox log has repeated command START / FAILURE records (exit code 1) for Get-Location and PowerShell, with no explicit access-denied cause.
  • Sandbox log indicates MXC available and Windows sandbox selection unelevated.
  • codex doctor run from repository A reports consistent installation, working auth and WebSocket/reachability, healthy state DB, repo correctly detected, 0 critical failures, with warnings for unverified ripgrep, optional MCP env vars, old thread/rollout discrepancies and non-Dev-Drive location.
  • Owners, ACL inheritance and icacls /verify on the compared top-level paths passed. Sandbox user group is present in both sibling workspaces.
  • No sandbox, permissions, security product, Git history, or repository configuration was changed to work around the issue.
Expected

PowerShell and cmd.exe read-only commands reliably execute and report their stdout/stderr and command exit status in both supported workspaces, or return an actionable sandbox setup/IPC error.

Actual

Local command execution stalls or loses its result in repository A, independently of shell selection and VS Code integration, while sibling repository B works with the same Codex installation.

Request

Is there a supported diagnostic or repair to isolate Windows sandbox workdir initialization, subprocess creation and tool output-delivery failures without disabling sandbox protection? The repo-specific/sibling-workspace A/B comparison may distinguish this from general CLI connectivity issues.

Related reports

Possibly related, root cause not established: #48593 (workspace-specific sandboxed command hang), #57614 (Windows App Server command/exec timeout), #60397 (PowerShell sandbox timeout).

Privacy: Repository A/B names, private content, user identifiers and sensitive logs are omitted. Reproduction does not require provider credentials or access to production services.

主要言語
Rust
スター
136k
フォーク
21.6k
平均マージ
1分
マージ済み PR(30日)
997

環境構築

はじめの一歩

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

openai/codex のほかの issue

openai/codex の issue をすべて見る

似ている issue

Rust の issue をもっと見る

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

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