(app-server and Desktop) thread/list treats omitted modelProviders as current-provider filter instead of all providers

Open 💬 4 comments Opened May 26, 2026 by joshrad-dev

What issue are you seeing?

The app-server thread/list API currently treats an omitted/null modelProviders field as an implicit filter for the currently configured model provider. If a third party app doesn't include the modelProviders field, then not all threads are shown. This issue is especially annoying when trying to continue a thread with a different model provider, as many apps, including Codex Desktop, don't see the thread with the new model provider. While this issue could be fixed both on the desktop and app server side, I think this is more of an app server issue than a desktop one, since an omitted filter shouldn't be filtering by default.

What steps can reproduce the bug?

App server

  1. Create local threads under at least two model providers, for example openai and lcpp.
  2. Configure Codex so the active provider is one of them, for example:
  model_provider = "lcpp"

  [model_providers.lcpp]
  name = "Llama.cpp"
  base_url = "http://localhost:8080/v1"
  wire_api = "responses"
  1. Call app-server thread/list with modelProviders omitted or set to null.
  2. Observe that only threads for the active provider are returned.
  3. Call thread/list again with:
  {
    "modelProviders": []
  }
  1. Observe that threads from all providers are returned.

Desktop

  1. Open Codex with default OpenAI config
  2. Send message in a folder
  3. Quit Codex Desktop
  4. Change config to use another model and provider
  5. Reopen Codex
  6. See that threads previously used are missing, only threads that used that provider previously are visible.

This is also inconsistent with the CLI since the CLI still lists threads that were started with other model providers.

Here is a screenshot with my OpenAI login, using the default OpenAI provider and model=gpt-5.5 in the config:
<img width="449" height="352" alt="Image" src="https://github.com/user-attachments/assets/e93d1f14-3a51-45a0-b2d2-851ac21a71fd" />

After quitting Codex, changing my config to the following, this is what I see:

model_provider = "lcpp"
model = "qwen3.6-27b-mtp"

<img width="433" height="500" alt="Image" src="https://github.com/user-attachments/assets/71e9a06e-df12-4ecd-bdc7-3f4aec71db40" />

What is the expected behavior?

Current behavior appears to be:

  • modelProviders: ["openai"] returns only openai threads.
  • modelProviders: [] returns all providers.
  • modelProviders: null / omitted returns only threads matching the current configured provider.

What it should be:

  • modelProviders: ["lcpp"] means only lcpp.
  • modelProviders: [] means all providers.
  • modelProviders: null / omitted means also all providers.

On the desktop side, I expect that my threads will still show up after switching providers.

Additional information

I pointed Codex to the desktop app.asar, and it confirmed that the desktop app currently sends listAllThreads({ modelProviders: null }) which is why threads go missing in the desktop app after switching model providers. If the app server is behaving as intended and you would rather fix it on the desktop app side, then switch model providers to be modelProviders: [] and it will include all threads from all model providers. Again this is inconsistent with the CLI since in the CLI you can resume across different model providers. This issue is the root cause of

Relevant code is here in main: https://github.com/openai/codex/blob/3da89d4831251b704ac40d1357d26ad518abaf1d/codex-rs/app-server/src/request_processors/thread_processor.rs#L3457

I also had drafted a fix but can't open a PR since I don't have permission: https://github.com/joshrad-dev/codex/tree/fix-thread-list-null-model-provider.

This code is the cause and fix for

the following issues:

https://github.com/openai/codex/issues/20184
https://github.com/openai/codex/issues/20004
https://github.com/openai/codex/issues/19088

After getting Codex to patch the ASAR to use [] instead of null for the modelProviders send, I'm now able to see all my threads across providers.
<img width="709" height="589" alt="Image" src="https://github.com/user-attachments/assets/098b82fd-9b07-44b0-8500-280ce29872bf" />

View original on GitHub ↗

This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗