Hi everyone,
I ran into an unusual issue with Codex CLI today and wanted to document the troubleshooting process in case anyone else encounters the same problem.
## Environment
- Codex CLI: `0.155.1`
- OS: Linux
- Model affected: `gpt-5.6-luna`
GPT-5.6 Luna had been available in `/model` previously, but later it suddenly disappeared from the model picker.
The visible model list contained models such as:
- GPT-6-Astra
- GPT-5.6-Sol
- GPT-5.6-Terra
- GPT-5.5
but GPT-5.6 Luna was missing.
---
## 1. Luna was still callable directly
I first tried starting Codex with the model explicitly:
```bash
codex -m gpt-5.6-luna
This worked.
Codex started with:
model: gpt-5.6-luna medium
and the model could respond normally.
However, Codex displayed this warning:
Model metadata for `gpt-5.6-luna` not found.
Defaulting to fallback metadata; this can degrade performance and cause issues.
So the backend still accepted gpt-5.6-luna, but Codex did not have its normal model metadata available.
2. The local model cache did not contain Luna
I checked:
~/.codex/models_cache.json
with:
jq -r '.models[] | [.slug, .display_name] | @tsv' \
~/.codex/models_cache.json
The current cache did not contain:
gpt-5.6-luna
This explained why Luna was no longer appearing normally in the model picker.
3. Codex 0.155.1 itself still contains Luna-related definitions
I searched the installed Codex binary and found references to:
gpt-5.6-luna
GPT-5.6-Luna
including metadata such as:
display_name: GPT-5.6-Luna
description: Fast and affordable agentic coding model.
default_reasoning_level: medium
So the installed Codex version itself was aware of Luna.
4. Editing models_cache.json directly was not persistent
I manually added Luna to:
~/.codex/models_cache.json
and verified that it appeared there.
However, after restarting Codex, the file was refreshed and Luna disappeared again.
So directly modifying models_cache.json was not a persistent solution.
5. I created a custom model catalog
I created a separate catalog:
~/.codex/models_with_luna.json
and added Luna there.
Then I added this to the top level of:
~/.codex/config.toml
model_catalog_json = "/home/<user>/.codex/models_with_luna.json"
I also temporarily set:
model = "gpt-5.6-luna"
After that, this command:
codex debug models
showed:
gpt-5.6-luna GPT-5.6-Luna list
So Codex was able to read the custom catalog.
6. The important part: an old Codex app-server was still running
Even after changing the configuration, the behavior did not immediately update.
I checked my running Codex processes:
ps -u "$USER" -o pid,ppid,lstart,cmd \
| grep -E '[c]odex( |$)|[c]odex-code-mode-host'
I found an older process similar to:
codex -c features.code_mode_host=true app-server --listen unix://
along with:
codex-code-mode-host
The app-server had been started before I changed the model configuration.
I terminated only my own old Codex app-server process:
kill <PID>
Important: on a shared server, do not use something like:
pkill codex
because that could terminate other users’ Codex processes.
I then verified that my old Codex processes were gone:
ps -u "$USER" -o pid,ppid,lstart,cmd \
| grep -E '[c]odex( |$)|[c]odex-code-mode-host'
7. Restarting Codex fixed the issue
After fully stopping the old Codex background process and starting Codex again:
codex
GPT-5.6 Luna appeared again and was usable.
Summary
In my case, the symptoms were:
GPT-5.6 Luna disappeared from /model
↓
codex -m gpt-5.6-luna still worked
↓
models_cache.json did not contain Luna
↓
custom model_catalog_json included Luna
↓
codex debug models could see Luna
↓
old Codex app-server was still running
↓
restart the old app-server / Codex background processes
↓
GPT-5.6 Luna appeared again
The main lesson for me was:
If Codex configuration or model metadata has changed but the UI still behaves as if it is using the old configuration, check whether an old app-server process is still running.
This may be especially relevant when using Codex CLI together with VS Code or other Codex integrations.
Hope this helps anyone who runs into the same issue.





