Skip to content

fix: resolve native Codex CLI on Windows PATH (#70) - #80

Closed
James3014 wants to merge 1 commit into
mainfrom
codex/issue-70-windows-codex-exe-final
Closed

James3014 wants to merge 1 commit into
mainfrom
codex/issue-70-windows-codex-exe-final

Conversation

@James3014

Copy link
Copy Markdown
Owner

Summary

Fixes #70 — resolves native Codex CLI binary discovery on Windows by using the correct platform path delimiter and searching for codex.exe instead of codex.

Root cause

resolveCodexBinary() used path.delimiter from a POSIX-biased import and searched only for codex (without .exe), causing complete PATH lookup failure on Windows even when Codex is correctly installed.

Changes

src/codex-goal-sessions.ts — resolveCodexBinary():

  • Import posix and win32 from node:path instead of delimiter
  • Use win32.delimiter on Windows, posix.delimiter on POSIX
  • Search codex.exe on Windows, codex on POSIX

src/codex-goal-sessions.test.ts — new test suite:

  • Hostile controls for win32 and platform contracts
  • Verifies correct delimiter and candidate name selection per platform
  • Maintains pre-existing override/PATH/fail-clearly contract

Verification evidence

  • 2/2 focused resolver tests PASS
  • 97/97 CI tests PASS (codex-goal-sessions-ci.test.ts)
  • Build: ✓ built in 881ms
  • git diff --check: clean
  • Blob SHAs:
    • src/codex-goal-sessions.ts: d79abab34ddc122162a09ab78bccf513f5ebf713
    • src/codex-goal-sessions.test.ts: 65f87c6f1b233ad1fa092592b55f7861f0e55a23

Candidate

  • HEAD: e4bad89e6d525bce8b116d5fc76177fd28432306
  • Parent: 5db22fd8a642016ad8a7a4fdbcd31e56d345a707 (current main)
  • Changed paths exactly: src/codex-goal-sessions.ts, src/codex-goal-sessions.test.ts

Outstanding

  • Real Windows runtime probe pending (no Windows host available in macOS CI environment)

Claim ceiling: ISSUE_70_SOURCE_CANDIDATE_LOCAL_VERIFIED_PENDING_REMOTE_CI_AND_INDEPENDENT_ACCEPTANCE

@James3014

Copy link
Copy Markdown
Owner Author

Superseded by codex/issue-70-windows-codex-exe-final-r2 bound to fresh main ee47c11 with splitPathEnv Windows colon repair.

@James3014 James3014 closed this Sep 11, 2026
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.

fix: resolve native Codex CLI on Windows PATH

1 participant