fix(codex): pin the Codex model explicitly (--ignore-user-config discards it) - #9
Merged
Conversation
…scards it CodexValidator passes --ignore-user-config, which throws away ~/.codex/config.toml — so the user's configured default model never reached lope and codex validated with whatever the CLI's built-in default happened to be. Pin it explicitly instead, overridable with LOPE_CODEX_MODEL. Reasoning effort stays "low" on purpose: these are fast pass/fail gates, and xhigh would make every validation slow and expensive. For a heavyweight opinion, call `codex exec` directly — it reads the user config. This change was written 2026-08-07 and has been running locally in the deployed checkout ever since, committed to no branch. Committing it so it survives the next release resync. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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.
What this is
This change has been running on the deployed machine since 2026-08-07, committed to no branch. I found it as an uncommitted modification in
~/.lopewhile cutting v0.16.0, and preserved it through the release resync. Committing it so the nextgit reset --harddoesn't erase it.The bug it fixes
CodexValidatorpasses--ignore-user-config, which discards~/.codex/config.toml. The user's configured default model therefore never reached lope, and codex validated with whatever the CLI's built-in default was. This pins the model explicitly, overridable viaLOPE_CODEX_MODEL.Reasoning effort stays
lowdeliberately — these are fast pass/fail gates, andxhighwould make every validation slow and expensive.Why it is NOT in v0.16.0
Deliberately held back. It hardcodes a default model slug (
gpt-5.6-sol) into a package published to PyPI. If that slug is not available to a given user, their codex validation breaks — and unlike the local machine, they would have no idea why. The env override softens it but does not remove the risk.Decision for the maintainer: either merge as-is (accepting the default), or change the default to fall back to the CLI's own default when
LOPE_CODEX_MODELis unset, which fixes the config-discarding bug without imposing a slug on everyone.Not urgent — the behaviour is already live locally either way.
🤖 Generated with Claude Code