Codex CLI 0.166.0 adds network diagnostics and fixes resumed context accounting
OpenAI has released Codex CLI 0.166.0 as a stable version. It adds a focused network diagnostic command and fixes a resume-or-fork accounting issue that could count retained reasoning tokens twice and trigger context compaction too early. The terminal interface also gains transcript selection, search and thread-resumption improvements.
The official GitHub Release API lists publication at 12:47 PDT on October 29, 2026, U.S. Pacific time (03:47 Beijing time on October 30). The release is neither a draft nor a prerelease. The earlier Atom feed lead for the same version and this stable release refer to one event.
Narrow network troubleshooting
The new codex doctor --network-only command focuses on effective configuration, network environment, HTTP reachability for the configured provider and Responses WebSocket checks. It skips unrelated diagnostics such as database and MCP scans.
The associated change says that if configuration loading fails, the command reports a redacted configuration error and stops instead of probing guessed network targets. The command helps separate configuration and connectivity problems; it does not promise to repair them automatically.
Keep reasoning-token accounting across resume and fork
According to the official change, resuming or forking a thread could lose the flag indicating whether reported token usage already included retained reasoning. Counting that reasoning again could overestimate context use and trigger automatic compaction too soon.
The fix persists and uses that accounting flag. Older records without the field keep their existing accounting behavior. OpenAI has not published a token-saving percentage for the fix, and it does not itself increase a subscription allowance.
Optionally resume a thread after queueing
The new codex queue --resume option can resume an unloaded thread after queueing a message through the local service or a selected remote service. Already loaded threads continue running; if resumption fails, the command warns while retaining the successfully queued result.
The terminal interface also adds keyboard-driven transcript selection, search and configurable shortcuts. The release notes list fixes for reconnection and offline exit, preservation of acknowledged permission settings, and app-server thread lifecycle issues. GPT-6.1 Terra is added to the bundled, Vertex AI and Amazon Bedrock model catalogs; this is catalog support, not a new model launch.
These details come from the official release notes and related code changes. This report did not install or independently test the release; results depend on the environment and workload.
