The Codex Changelog
All Episodes
Fixing Codex Compaction Crashes on Custom Gateways

Fixing Codex Compaction Crashes on Custom Gateways

0:00|0:00

Discover how the new capabilities block in Codex CLI 0.162.0 fixes context compaction crashes when using custom gateways like LiteLLM and Ollama. Plus, learn about key daemon fixes in version 0.162.1 and the retirement of GPT-5.5.


Chapter 1

Capability Overrides for Custom Providers

Ethan Park

If you've ever pointed Codex at a gateway that isn't OpenAI and watched a long session fall over right as it approached the context limit, today's episode is for you. And thanks to Jellypod for helping make this daily show a reality. The change is in Codex CLI 0.162.0, released October 8th, 2026. It adds a capabilities block for custom model providers that speak the Responses API. It lives in your config.toml under model_providers, then your provider ID, then capabilities.

Maya

Here's why it matters. Codex only speaks the Responses wire protocol now. The old chat wire API is gone, and if you configure it you get a deserialization error. For first party providers, meaning OpenAI and Azure Responses, remote compaction defaults to version two. That means when a conversation gets close to the context window, Codex sends a compaction_trigger item over the slash v1 slash responses protocol and lets the server handle the truncation. The problem is that local gateways, private proxies, and third party engines often can't parse that item. People running things like LiteLLM, vLLM, or Ollama behind a Responses shim reported HTTP 400 errors, dropped WebSockets, or aborted tasks right when a long session needed compaction. Short sessions looked fine, which made it painful to debug.

Ethan Park

So there are two switches. The first is external_web_access, a boolean. It controls whether hosted web search, initiated by or for that provider, is allowed to reach the live internet. Set it to false and an on premises or air gapped provider can't leak requests out through web search. The second is remote_compaction, and it's a string with two valid values. Version two, written as the string v2, sends those compaction_trigger items to the server. Unsupported, written as the string unsupported, tells Codex to skip that and do the compaction locally on your machine instead.

Maya

Let me walk through a config. At the top level, you set model to whatever your gateway serves, say mistral large latest, and model_provider to a provider ID. I'll call it corpgateway. Then you add a table called model_providers dot corpgateway with a name, a base_url pointing at your proxy's slash v1 endpoint, wire_api set to the string responses, and env_key naming the environment variable that holds your key, for example CORP_AI_KEY. Then comes the new part, a second table called model_providers dot corpgateway dot capabilities. Inside it, external_web_access equals false, and remote_compaction equals the string unsupported. That's the whole fix. You can also test it ad hoc without editing the file. Run codex with the c flag and pass model_providers dot corpgateway dot capabilities dot remote_compaction equals quoted unsupported. And codex doctor will confirm your provider configuration and connection health.

Ethan Park

Now the caveats. First, local compaction isn't free. When Codex compacts on the client, it spends extra prompt round trips and tokens to condense the history, instead of the server doing it. So you're trading a crash for some cost and latency. Second, any capability you omit inherits the provider defaults, and those assume an OpenAI style Responses feature set. If you leave remote_compaction out on a gateway that can't handle it, you're back where you started. So be explicit. Don't assume your proxy supports the full surface just because it accepts basic requests.

Maya

One more thing to watch if you use model_catalog_url. Since 0.160.0, bundled models are no longer merged in with a provider's remote catalog. That means the catalog your provider returns has to explicitly list every model you want to select. If a model you expect is missing from the picker after this change, check that catalog before you blame the capabilities block.

Chapter 2

Daemon Fix, Small Wins, and a Retirement

Ethan Park

The companion fix is 0.162.1, which shipped October 9th. In 0.162.0, if the shared background daemon was running with a different feature set than your CLI defaults, startup could fail. The usual trigger was launching Codex from different folders or worktrees. The patch, pull request 52648, narrows that compatibility check so it applies only to explicit command line feature overrides, meaning the c flag, the enable flag, and the disable flag. If you hit a silent startup lockout on 0.162.0, upgrade to 0.162.1. The same release fixes a terminal crash when asynchronous questions contained multiple lines. It now keeps the line breaks and the full hyperlink destinations.

Maya

A few smaller things from 0.162.0 are worth knowing. In the agent Command Center, press p on a task and it moves into a shared Pinned group, when the server supports it. For transcripts, the slash copy command lets you navigate and copy transcript blocks, Control plus Insert copies a selection, and tui.mouse_scroll_speed tunes the mouse wheel. It takes a positive number, and the default is 1.0. URLs are now clickable in approval headers, questions, MCP prompts, warnings, and banners, even when they wrap across lines. On Windows or DOS files, apply_patch now preserves existing CRLF line endings by default, so you don't need the old opt in flag. And Codex now honors the server's Retry After header on retryable Responses and WebSocket failures, which helps when a provider is shedding load.

Ethan Park

One calendar item, and it's today. October 14th, 2026 is the retirement date for GPT 5.5 in ChatGPT, ChatGPT Work, and Codex, on all plans. It doesn't apply to the OpenAI API. If any config, script, scheduled task, or custom agent still names gpt 5.5, update it now. The options are GPT 6.1 Sol, GPT 6 Sol, or GPT 6 Luna. Grep your repos and your config.toml, and then run codex doctor once to check everything still resolves.