[Bug] Codex resume fails when the saved model provider no longer exists
Problem
Cold-resuming a native Codex session fails when its persisted thread names a model provider that is no longer configured, even though the new app-server has a working current provider. The same failure affects the native CLI and runner preload paths.
Codex returns:
{'code': -32600, 'message': 'failed to load configuration: Model provider `legacy-provider` not found'}Reproduction
- Create a native Codex session using a custom provider.
- Replace/remove that provider in the host configuration and configure a current provider.
- Cold-resume the old thread so a new app-server loads it from disk.
Observed: preload_codex_thread_for_resume sends thread/resume without a provider override and startup fails on the saved provider name.
Expected: preserve the thread and conversation history while recovering through the app-server's current configured provider.
Evidence
Reproduced locally on Linux with Codex CLI 0.154.0 and Omnigent main. A synthetic rollout naming a removed provider fails with the error above. Reading config/read and retrying thread/resume with that configuration's modelProvider succeeds with the original thread ID and retained history. No inference request was needed.
Source: omnigent-ai/omnigent