What changed in Codex CLI v0.167, codex agents and the auto-compaction fix

Codex Published:

Codex CLI v0.167.0 adds unread markers to the agent command center and fixes how automatic context compaction counts tokens. It also makes a --no-daemon claim the docs contradict.

Verified on Nov 9, 2026 Verified with Codex CLI v0.167.0 These tools change quickly. Please also check the latest official documentation. How articles are researched and verified
Contents
  1. Opening the agent command center with codex agents
  2. Automatic compaction now counts failed responses
  3. Vertex AI and system proxy settings are not in the reference yet
  4. The remaining fixes
  5. Summary

Codex CLI v0.167.0 ships six new features, six bug fixes, two documentation changes and two chores. Two of them matter for everyday work: the agent command center gets unread markers, and automatic context compaction now counts tokens it used to miss.

One caveat first. This release contains a flag spelling that the official documentation contradicts outright, so it is worth knowing before a command fails on you.

KEY POINT

What you will learn

  • What codex agents opens, and whether you may pass --no-daemon to it
  • What automatic context compaction now counts, and where to set its threshold
  • Which v0.167.0 settings are still missing from the configuration reference

Opening the agent command center with codex agents

The first release note reads: "Open the agent command center with codex agents --no-daemon. The command center and session picker now mark unread results". The screen that lists chats on a shared server now flags results you have not read.

codex agents itself is documented, with maturity Stable. The command overview describes it as "Open the agent command center on a shared local or remote server", and its own section as "Open the command center to browse chats and switch between agents on a shared server".

FlagWhat it does
--remote <URL>Connect to a remote server
--cd <DIR>Set the directory used for new remote tasks
--remote-auth-token-envA global flag, documented as requiring --remote

You can reach the same screen from inside the TUI with /agents, listed in the slash-command table as "Open the agent command center." with the when-to-use note "Browse chats and switch between agents on the connected server." A separate /subagents command switches the active subagent thread.

The docs say --no-daemon cannot be combined with codex agents

As of 2026-11-09 the codex agents section states "codex agents doesn't support --no-daemon". The global --no-daemon flag ("Run the interactive CLI without the shared background server.") carries the matching note "Can't be combined with --remote or codex agents". The v0.167.0 release notes spell the command with that flag anyway. Which one reflects the current implementation could not be confirmed in the official documentation. Start with a plain codex agents and only reach for the flag if that fails.

Automatic compaction now counts failed responses

The widest-reaching fix is: "Automatic context compaction now accounts for retained output from failed responses and responses with missing token usage data". Retained output from failed responses, and responses whose token usage never arrived, now feed into the compaction decision.

Until now those tokens went uncounted, so Codex judged compaction against a figure lower than real consumption. That is exactly the kind of drift that lets a long session run out of context without compaction ever firing.

The threshold lives in config.toml. These four keys are the ones documented today.

# Token threshold that triggers automatic history compaction
model_auto_compact_token_limit = 300000

# How the threshold is counted: "total" counts the full active context,
# "body_after_prefix" counts only growth after the carried compaction prefix
model_auto_compact_token_limit_scope = "total"

# Turn-end compaction, as a percentage of the usable context window
model_post_turn_compact_threshold_percent = 85

# Replace the prompt used for compaction
compact_prompt = "Summarize the work so far, keeping file paths and decisions."
KeyValueDescription
model_auto_compact_token_limitnumberToken threshold for automatic compaction. Unset uses model defaults
model_auto_compact_token_limit_scopetotal / body_after_prefixDefaults to total, which counts the full active context
model_post_turn_compact_threshold_percentinteger 0–100Omit or set 0 to disable turn-end compaction. The usual auto-compaction limits still apply
compact_promptstringInline override for the compaction prompt

To compact by hand, use /compact, documented as "Summarize the visible chat to free tokens." with the advice "Use after long runs so Codex retains key points without blowing the context window." For the rest of the file, see How to write Codex config.toml and its main settings keys.

Vertex AI and system proxy settings are not in the reference yet

Two release notes touch configuration, and neither has reached the configuration reference.

The first reads: "Find API key and cloud provider options under 'Sign in another way.' Enable gcp_setup_wizard to set up Google Cloud Vertex AI with Application Default Credentials or a credential file". A key named gcp_setup_wizard could not be found in the configuration reference as of 2026-11-09. These are the Vertex AI keys that are documented.

KeyDescription
model_providers.gcp.project_idGoogle Cloud project ID for the Vertex AI endpoint. Takes precedence over GOOGLE_CLOUD_PROJECT
model_providers.gcp.locationLocation for the Vertex AI endpoint. Takes precedence over GOOGLE_CLOUD_LOCATION, defaults to global
model_providers.gcp.credential_fileAbsolute path to an Application Default Credentials file. Overrides GOOGLE_APPLICATION_CREDENTIALS only for the provider's authentication command
model_providers.gcp.base_urlOverride the built-in Vertex AI endpoint. Otherwise Codex builds it from the project ID and location

The second reads: "Opt into macOS or Windows system proxy settings from /experimental". The /experimental command is documented ("Toggle experimental features." / "Enable options such as Network proxy or Prevent sleep while running."), and so is the matching key features.network_proxy ("Start the network proxy for sandboxed commands (experimental; off by default)."). But reading the operating system's proxy configuration, and the handling of variables such as HTTP_PROXY, could not be confirmed on those two pages. Environment-variable behaviour lives on a separate page, so check that before you turn the setting on.

The remaining fixes

The rest of the release is about keeping state that used to be dropped.

  • Saved chats stay visible after you switch model providers. If a chat cannot resume, you can still read its transcript and prepare an editable prompt to continue elsewhere
  • Ctrl+L clears the terminal display while earlier messages stay reachable through Ctrl+T. The docs confirm only the first half, "Ctrl+L only clears the terminal view and keeps the current chat." — no documentation for Ctrl+T could be found
  • Deleting text that exposes a leading ! keeps an ordinary draft in chat mode
  • Network approval prompts close when their requests end, and concurrent requests to the same endpoint prompt one at a time
  • Long realtime V3 conversations save completed speech into chat history as the transcript grows

On the documentation side, the app-server README now covers managed network constraints under [permissions.network] and prompt-user command rules that require fresh human approval. Note that the configuration reference has no section by that literal name: it documents named profiles as [permissions.<name>] with network.* keys beneath them. For how approvals and sandboxing interact, see Codex approval_policy and sandbox_mode combinations; for the previous release, see What changed in Codex CLI v0.166, codex queue --resume and codex doctor --network-only.

Summary

  • The headline changes in v0.167.0 are unread markers in the agent command center and drafts that survive a backend switch
  • codex agents is a Stable command, but the docs deny that it accepts --no-daemon, contradicting the release notes; which one is current could not be confirmed
  • Automatic context compaction now counts retained output from failed responses and responses with missing usage data
  • Tune the threshold with model_auto_compact_token_limit and model_auto_compact_token_limit_scope
  • gcp_setup_wizard and the system-proxy option do not appear in the configuration reference pages checked here

FAQ

What does codex agents do?
The docs describe it as "Open the agent command center on a shared local or remote server". It lists chats on a shared server and lets you switch between agents.
Can I run codex agents --no-daemon?
As of 2026-11-09 the official docs state "codex agents doesn't support --no-daemon". The v0.167.0 release notes spell the command with that flag, so the two sources disagree.
Where do I change the automatic compaction threshold?
Set model_auto_compact_token_limit in config.toml. model_auto_compact_token_limit_scope selects whether the threshold counts total active context or only growth after the carried prefix.

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.