Skip to content

fix: Windows spawn ENOENT and EISDIR errors (#116)#155

Open
D2758695161 wants to merge 3 commits intoopenai:mainfrom
D2758695161:fix/windows-enoent-eisdir
Open

fix: Windows spawn ENOENT and EISDIR errors (#116)#155
D2758695161 wants to merge 3 commits intoopenai:mainfrom
D2758695161:fix/windows-enoent-eisdir

Conversation

@D2758695161
Copy link
Copy Markdown

Summary

Fixes #116: Two Windows-specific bugs preventing /codex:review from working.

Bug 1: spawn ENOENT — Missing shell: true

File: scripts/lib/app-server.mjs

Added shell: process.platform === "win32" to spawn call for .cmd file support.

Bug 2: EISDIR — Directories in untracked files

File: scripts/lib/git.mjs

Added stat.isDirectory() check in formatUntrackedFile to skip directories.

Files Changed

  • plugins/codex/scripts/lib/app-server.mjs
  • plugins/codex/scripts/lib/git.mjs

Fixes #116

— 一筒 🦀

@D2758695161 D2758695161 requested a review from a team April 5, 2026 09:19
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a8eb41b812

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment on lines +139 to 143
if (stat.isDirectory()) {
return `### ${relativePath}
(skipped: directory)`;
}

const buffer = fs.readFileSync(absolutePath);
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Reinstate max-size check before reading untracked files

The new directory guard removed the previous MAX_UNTRACKED_BYTES gate, so formatUntrackedFile now readFileSyncs every non-directory untracked file regardless of size. In working trees that contain large generated artifacts (logs, dumps, fixtures), /codex:review can consume excessive memory and produce oversized context payloads that fail or degrade review runs. Keep the directory skip, but also restore the size limit check before reading file contents.

Useful? React with 👍 / 👎.

model: request.model,
effort: request.effort,
sandbox: request.write ? "workspace-write" : "read-only",
sandbox: request.fullAccess ? "danger-full-access" : (request.write ? "workspace-write" : "read-only"),
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Wire --full-access through to task execution

executeTaskRun now selects sandbox mode from request.fullAccess, but task requests built in handleTask never set that property, so this condition is always false. As a result, users can pass --full-access and still run in read-only/workspace-write, which silently breaks commands that need danger-full-access permissions.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Windows: spawn ENOENT and EISDIR errors prevent review/adversarial-review

1 participant