Skip to content
News

AI insights

OpenAI Codex CLI v0.173.0: Default MCP Sharing & Hook Blocking

OpenAI Codex CLI v0.173.0 (rust-v0.173.0) adds default MCP connection sharing, PreToolUse onFailure block enforcement, OAuth discovery, and daemon update locks.

OpenAI Codex CLI v0.173.0: Default MCP Sharing & Hook Blocking

Q. What changes the most for real-world workflows in OpenAI Codex CLI v0.173.0? Released on December 2, 2026 (UTC), Codex CLI v0.173.0 (rust-v0.173.0) introduces default MCP connection sharing, onFailure: block enforcement on PreToolUse hooks, and features.daemon_updates = false for locking daemon updates. It turns prompt-level caution into system-level tool blocking and enterprise MCP/OAuth control.

⚠️ Accuracy guardrail: This report is based on the official openai/codex GitHub release notes (rust-v0.173.0, published 2026-12-02T02:16:28Z) verified on December 3, 2026. The exact megabyte reduction of the smaller npm tarballs and full JSON/TOML schema examples for onFailure: block were not published in the release notes.

30-second summary

  • Default MCP sharing & legacy server support (#62552): Codex shares MCP connections by default and supports older local servers that require initialize as their first request.
  • Block tool execution on hook failure (#62831): Synchronous command and MCP tool hooks can set onFailure to block, preventing a tool from running when a PreToolUse check fails.
  • OAuth auto-discovery & daemon lock (#62824, #62690): Codex automatically discovers OAuth endpoints when config_server.oauth is omitted, while admins can disable both scheduled and manual daemon updates via features.daemon_updates = false.
  • TUI, attachment safety & lighter npm packages (#62687, #62583, #62643): Pasting an image path creates a private copy so attachments survive moving or deleting the original; sidebar previews refresh on atomic file saves; and libdeflate shrinks npm packages.

Building on 0.172.0: from lazy MCP to enforcement

If 0.172.0 focused on lazy MCP startup and gRPC defaults, 0.173.0 adds connection sharing, hard hook blocks, and admin controls.

Just days after Codex CLI v0.172.0 introduced lazy MCP initialization and gRPC defaults, rust-v0.173.0 tackles the operational pain points of long-running team sessions: duplicate MCP processes, advisory-only hooks, and unmanaged daemon updates.

openai/codex GitHub 0.173.0 official release page

Advertisement

Default MCP sharing and OAuth auto-discovery

Codex reuses MCP connections across sessions by default while supporting legacy local servers and zero-config OAuth endpoints.

Area Before (pre-0.173.0) In v0.173.0 (rust-v0.173.0)
MCP connection model Per-client or isolated connections Shares MCP connections by default (#62552)
Legacy local MCP servers Limited compatibility on strict handshake Supports servers requiring initialize first
OAuth endpoint config Manual config_server.oauth setup Auto-discovers OAuth endpoints when omitted (#62824)
Memory & trace telemetry Higher active-turn memory footprint Releases persisted MCP results (#62641) & records traces (#62833)

Automatic OAuth discovery (#62824, #62859) is especially helpful when rolling out internal remote MCP servers across developer machines without distributing per-endpoint OAuth URLs in every config file.

Q. Does this also address memory growth from long MCP sessions? Yes—#62641 releases persisted MCP tool results from active-turn memory, reducing memory pressure during extended sessions.

PreToolUse hook blocking and daemon update locks

Hooks can now halt tool execution before it starts, and administrators can pin daemon versions via policy.

OpenAI Codex CLI v0.173.0 key architecture changes

  1. Blocking execution with onFailure: "block" (#62831): Supported synchronous command and MCP tool hooks can set onFailure to block. When a PreToolUse check fails, Codex blocks the tool from running instead of continuing—mirroring the hardening trend seen in Claude Code v2.1.332 with PreSkillShellCommand.
  2. Blocking daemon updates (#62690): Administrators can set features.daemon_updates = false in managed requirements.toml or local MDM policies to block both scheduled and manual daemon updates.
  3. Live Guardian policy updates (#62585, #62614): Running threads immediately pick up updated approval requirements and Guardian policies upon configuration reload, sign-in, or sign-out.

TUI rendering, safe image attachments, and lighter npm installs

Pasted image attachments no longer break if you clean up the source file, and terminal Markdown gains richer diagrams and math.

  • Private copies for pasted images (#62687): Pasting an image file path copies it into a temporary private TUI attachment, so moving or deleting the original file before sending will not break the prompt.
  • Atomic-save sidebar refresh (#62583): Open sidebar file previews now refresh when files change on disk, even when an editor replaces the file rather than modifying it in place.
  • Richer terminal Markdown (#62550, #62554, #62577): Supports multiline labels on Mermaid flowchart edges, labeled LaTeX underbraces in display math, \widetilde over single characters, plus left/center/right/justified status line alignment (#62569, #62637).
  • Better WebSocket errors & smaller npm tarballs (#62749, #62771, #62643): Codex surfaces server WebSocket rejection reasons (such as oversized payloads) even if an upload stalls, and libdeflate shrinks npm install/update downloads.

Developer MacBook Pro terminal workspace

Toris's take

While solo builders benefit from safer image attachments and lighter npm updates, teams running shared MCP servers and security hooks get the biggest upgrade in 0.173.0.

  1. Why upgrade now: Being able to enforce onFailure: "block" on PreToolUse hooks turns linting, secret scanning, and policy checks into hard gates rather than polite prompt instructions.
  2. What to check before rolling out: If your organization pins CLI versions via MDM or requirements.toml, review features.daemon_updates = false. Also re-test any older local MCP servers that previously failed due to strict initialize handshake requirements.
  3. Tip for solo builders: If you frequently paste screenshot paths into the terminal and immediately delete or archive them, #62687 alone removes a common friction point—and npm i -g @openai/codex is lighter to pull down too.

Follow more developer tool releases on Toris News.

Sources

Advertisement