Codex CLI v0.166 adds codex queue --resume and codex doctor --network-only

Codex Published:

v0.166.0 adds a --resume flag that resumes unloaded threads after queueing, and codex doctor --network-only for narrower diagnostics. Plus fixes to resume and fork.

Verified on Nov 2, 2026 Verified with Codex CLI v0.166.0 These tools change quickly. Please also check the latest official documentation. How articles are researched and verified
Contents
  1. codex queue --resume resumes the thread
  2. codex doctor --network-only narrows the report
  3. Transcript handling and the other features
  4. Fixes around resume and fork
  5. Summary

Codex CLI v0.166.0 ships six features and seven fixes. Two matter day to day: codex queue --resume and codex doctor --network-only.

Both are flags on existing commands, so knowing what each command already does is the quickest way to see what changed.

KEY POINT

What this article covers

  • How codex queue works and the situation --resume fixes
  • What codex doctor checks, and what --network-only narrows it to
  • Approval settings and token accounting now surviving resume and fork

codex queue --resume resumes the thread

The release notes read: "Added codex queue --resume to resume unloaded threads after queueing a message."

codex queue itself is documented: it queues a text message for an existing session.

codex queue --thread <SESSION_ID> --message "Run the remaining checks"
OptionDetail
--threadA UUID or an exact session name; use a UUID when sessions share a name
--messageThe text to queue
Others--remote and --remote-auth-token-env are accepted; image attachments are not

Previously, queueing a message to a thread that was not loaded left it waiting. With --resume, queueing and resuming happen in one step — useful when a script or CI job adds work to an existing session.

--resume is not in the commands documentation

As of 2026-11-02, the flags documented for codex queue are --thread, --message, --remote and --remote-auth-token-env. There is no entry for --resume; it appears only in the release notes.

codex doctor --network-only narrows the report

The other addition: "Added codex doctor --network-only for focused configuration, connectivity, and WebSocket diagnostics."

codex doctor is the diagnostic command to run before filing a support issue or while investigating a broken installation. The documentation describes its scope as "installation, configuration, authentication, runtime, Git, terminal, app-server, and thread inventory health".

# The full report
codex doctor

# Narrowed to configuration, connectivity and WebSocket
codex doctor --network-only

The full report includes the thread inventory, so it takes a while. When the symptom is clearly network-side — connections failing behind a proxy, WebSockets dropping — --network-only is the faster path.

This flag could not be confirmed in the documentation either: codex doctor's option table is rendered dynamically on that page, so individual flags are not readable from the Markdown.

For the network proxy settings themselves, see Combining approval_policy and sandbox_mode in Codex.

Transcript handling and the other features

The remaining four are display and interaction changes.

AdditionWhat it does
Transcript selectionKeyboard-driven, with word, line and page motions, integrated search, and configurable shortcuts
Markdown renderingMade consistent in async questions, choices, answers and transcript replies
GPT-6.1 TerraAdded to the bundled, Vertex AI and Amazon Bedrock model catalogs
Safety-block explanationsClearer reasons in the TUI, with selectable safer follow-up prompts

GPT-6.1 Terra reached the bundled catalog in v0.165.0; v0.166.0 adds it to the Vertex AI and Amazon Bedrock catalogs. That follows v0.165.0 making Vertex AI a built-in provider via model_provider = "gcp" — see Codex CLI v0.165 makes Vertex AI a built-in provider.

Fixes around resume and fork

Two of the seven fixes concern resuming and forking sessions.

  • Approval and permission settings persist: "Preserved acknowledged approval and permission settings when resuming or forking threads."
  • Reasoning-token accounting persists: "Preserved reasoning-token accounting across resume and fork to avoid premature compaction."

The second has the clearer practical effect. When the accounting reset, a resumed session could be judged to have met the compaction threshold while it actually had room left, so context was lost earlier than it needed to be.

Also fixed: spawned descendant threads are restored when their parent is unarchived, app-server thread startup and shutdown races are resolved with completed runtimes released promptly, and TUI reconnection recovery now handles offline /quit and /exit.

Summary

  • codex queue --resume queues a message and resumes an unloaded thread in one step
  • codex queue takes a UUID or exact session name in --thread and does not support image attachments
  • codex doctor --network-only narrows diagnostics to configuration, connectivity and WebSocket
  • Approval settings and reasoning-token accounting now survive resume and fork
  • Neither --resume nor --network-only could be confirmed in the official commands documentation

FAQ

How do I use codex queue?
codex queue --thread <SESSION_ID> --message "..." queues a text message for an existing session. --thread takes a UUID or an exact session name, and image attachments are not supported.
What does codex doctor check?
Per the docs, it reports on installation, configuration, authentication, runtime, Git, terminal, app-server and thread inventory health. The new --network-only narrows that to configuration, connectivity and WebSocket diagnostics.
Are --resume and --network-only in the official docs?
As of 2026-11-02 the commands documentation lists neither flag, though both commands themselves — codex queue and codex doctor — are documented.

Primary sources

This article was drafted by AI from official documentation and reviewed by the site operator before publishing. Found a mistake? Let us know via the contact page.