New models cache breaks older clients sharing CODEX_HOME
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 72/100
Research direction
Start in the codex-models-manager code at ModelsCacheEntry.models and compare its deserialization with ModelsResponse's legacy serializer. Add the persisted-JSON regression described in the issue so older clients can read refreshed cache entries, then run cargo fmt -- --check, the package tests, and clippy with warnings denied.
Written by the indexing model from the issue text.
Description
What happens
Codex 0.148 writes models_cache.json entries with canonical model_messages.instructions_template but without the deprecated top-level base_instructions. An older Codex 0.146 process sharing the same CODEX_HOME deserializes the complete model array before checking client_version, so it logs:
failed to load models cache: missing field `base_instructions`
It then falls back to a remote fetch, so functionality continues, but the warning recurs whenever the newer process refreshes the shared cache.
Source gap
ModelsResponse already uses both serialize_model_infos_with_legacy_base and deserialize_model_infos_with_legacy_base. ModelsCacheEntry.models uses only the deserializer, so the compatibility guarantee is lost specifically when persisting the file cache.
Proposed fix
Commit https://github.com/joshmouch/codex/commit/59449eb735 adds the existing legacy serializer to ModelsCacheEntry.models and a raw persisted-JSON regression.
Verification:
cargo fmt -- --checkcargo test -p codex-models-manager(49 passed)cargo clippy -p codex-models-manager --all-targets --all-features -- -D warnings
I can open the PR if a maintainer invites it under the repository contribution policy.
- Dominant language
- Rust
- Stars
- 125k
- Forks
- 19.5k
- Avg merge
- 1m
- Merged PRs (30d)
- 1k
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from openai/codex
-
enhancement remote
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
bug CLI windows-os
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
macOS sandbox blocks hw.optional.arm64 sysctl, causing Flutter to misdetect Apple Silicon as x64 Openbug CLI sandbox
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
bug CLI TUI
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
-
CLI config enhancement skills
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
gitbutlerapp/gitbutler#15998 · 1 comment ·
-
bug triage:deciding
Difficulty 1/5 Under an hour Newbie friendliness 88/100
open-telemetry/otel-arrow#4132 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
bitcoindevkit/bdk-ffi#1125 ·