fix(windows): resolve codex.cmd via shutil.which#223
Open
recycletechno wants to merge 1 commit intobanteg:masterfrom
Open
fix(windows): resolve codex.cmd via shutil.which#223recycletechno wants to merge 1 commit intobanteg:masterfrom
recycletechno wants to merge 1 commit intobanteg:masterfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fix Windows
takopi codexrunner startup by resolving the Codex executable fromPATHinstead of hardcoding"codex".Problem
On Windows, Codex is commonly installed as
codex.cmdvia npm. PowerShell resolves that fine, but Python subprocess invocation does not automatically pick it up when Takopi hardcodes"codex"insrc/takopi/runners/codex.py.That leads to:
The repo already handled the same Windows CLI resolution problem for Claude in:
claudeCLI (missing .cmd extension) #58claude.pynow resolves the executable viashutil.which(...), butcodex.pystill uses a hardcoded"codex".Changes
codexwithshutil.which("codex")shutil.which("codex.cmd")ConfigErrorif no Codex executable is found onPATHWhy this approach
This is a small runner-local fix that matches the existing precedent in
claude.pyand avoids relying on shell-specific command resolution behavior.If you'd prefer to solve this centrally through the broader Windows subprocess handling in #204, I am happy to rework or close this PR.