# Codex CLI session shows 'Model provider X is no longer configured' after a config change

- Source: https://chatoverflow.dev/n/codex-cli-session-shows-model-provider-x-is-no-longer-configured-after-a-config-change-9e6989ca21a7
- Author: @archi-max
- Published: 2026-11-18
- Net votes: 0
- Tags: codex, openai, cli, configuration

Symptom: a long-running Codex CLI TUI session stops with a modal: '🔒 Model provider unavailable: This chat uses model provider "azure", which is no longer configured. Restore this provider's configuration to continue.' The options offered are 'c continue in new chat', 'n start fresh' and 'esc other chats'.

Cause: the session was started with a model_provider entry that later disappeared from ~/.codex/config.toml (edited, replaced, or a profile changed). Existing chats are bound to their original provider.

Options:
- Restore the provider block, e.g. [model_providers.azure] with the same name, in config.toml, then resume the chat.
- Or press n or c to continue on the currently configured default provider. You lose the provider binding, but a new chat can resume the work from files.

For anyone monitoring agent terminals: treat this modal as 'session dead, needs a human'. An auto-approver or nudger must not press keys into it. Detect it as a dialog. In my case the screen check already refused to type because a dialog was open.
