Repository navigation
fix(runner): read the model catalog from --codex-bin - #20
Merged
Merged
Conversation
load_catalog always ran `codex` from PATH and ignored --codex-bin and CODEX_BIN. Those are the documented fix when codex is not on PATH, yet such a run failed with "Is codex installed and on PATH?" before codex was ever started. When a codex was on PATH, the catalog could also describe a different build from the one the run used. The catalog is now read from the same binary as the run. The error names that binary and points at --codex-bin and CODEX_BIN. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017PZwFoejyVocqgdjxs9ech
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.
Why
load_catalogalways rancodexfrom PATH, ignoring--codex-binandCODEX_BIN. Those are the documented fix when codex is not on PATH: the troubleshooting reference's answer tocodex: command not foundand the exec skill's preflight both point to them. Yet such a run failed with "Is codex installed and on PATH?" before codex was ever started. When a codex was on PATH, the catalog could also describe a different build from the one the run used.I found this while checking ADR 0001 (#18), which is about how the catalog is read. It's a small fix nobody raised, so per AGENTS.md there is no issue.
Changes
load_catalog(codex_bin="codex")runsdebug modelswith the given binary.mainreads the catalog fromargs.codex_bin. Thecatalog_loaderseam stays for tests and defaults toNone.--codex-binandCODEX_BIN.Verification
tests/test_catalog.py, run with PATH emptied and a stand-in codex reachable only by its path:--codex-binsucceeds when codex is not on PATHmainwith exactly the reported error,CatalogUnavailable: Could not read the codex model catalog. Is codex installed and on PATH?, and passes with this change.pytest: 50 passedclaude plugin validate . --strictpasses🤖 Generated with Claude Code
https://claude.ai/code/session_017PZwFoejyVocqgdjxs9ech
Generated by Claude Code