Skip to content

fix(runner): read the model catalog from --codex-bin - #20

Merged
GauranshMathur merged 1 commit into
mainfrom
claude/wizardly-volta-nt0gn4
Oct 1, 2026
Merged

GauranshMathur merged 1 commit into
mainfrom
claude/wizardly-volta-nt0gn4

Conversation

@GauranshMathur

Copy link
Copy Markdown
Owner

Why

load_catalog always ran codex from PATH, ignoring --codex-bin and CODEX_BIN. Those are the documented fix when codex is not on PATH: the troubleshooting reference's answer to codex: command not found and 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") runs debug models with the given binary.
  • main reads the catalog from args.codex_bin. The catalog_loader seam stays for tests and defaults to None.
  • The error names the binary it tried and points at --codex-bin and CODEX_BIN.

Verification

  • New tests/test_catalog.py, run with PATH emptied and a stand-in codex reachable only by its path:
    • the catalog is read from the named binary
    • a full run with --codex-bin succeeds when codex is not on PATH
    • an unreadable catalog's error names the binary and the fix
  • The end-to-end test failed on main with 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 passed
  • claude plugin validate . --strict passes

🤖 Generated with Claude Code

https://claude.ai/code/session_017PZwFoejyVocqgdjxs9ech


Generated by Claude Code

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
@GauranshMathur
GauranshMathur merged commit d944341 into main Oct 1, 2026
1 check passed
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.

2 participants