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.

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: blockenforcement onPreToolUsehooks, andfeatures.daemon_updates = falsefor 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/codexGitHub 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 foronFailure: blockwere 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 requireinitializeas their first request. - Block tool execution on hook failure (
#62831): Synchronous command and MCP tool hooks can setonFailuretoblock, preventing a tool from running when aPreToolUsecheck fails. - OAuth auto-discovery & daemon lock (
#62824,#62690): Codex automatically discovers OAuth endpoints whenconfig_server.oauthis omitted, while admins can disable both scheduled and manual daemon updates viafeatures.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; andlibdeflateshrinks 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.

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—
#62641releases 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.

- Blocking execution with
onFailure: "block"(#62831): Supported synchronous command and MCP tool hooks can setonFailuretoblock. When aPreToolUsecheck fails, Codex blocks the tool from running instead of continuing—mirroring the hardening trend seen in Claude Code v2.1.332 withPreSkillShellCommand. - Blocking daemon updates (
#62690): Administrators can setfeatures.daemon_updates = falsein managedrequirements.tomlor local MDM policies to block both scheduled and manual daemon updates. - 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,\widetildeover 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, andlibdeflateshrinks npm install/update downloads.

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.
- Why upgrade now: Being able to enforce
onFailure: "block"onPreToolUsehooks turns linting, secret scanning, and policy checks into hard gates rather than polite prompt instructions. - What to check before rolling out: If your organization pins CLI versions via MDM or
requirements.toml, reviewfeatures.daemon_updates = false. Also re-test any older local MCP servers that previously failed due to strictinitializehandshake requirements. - Tip for solo builders: If you frequently paste screenshot paths into the terminal and immediately delete or archive them,
#62687alone removes a common friction point—andnpm i -g @openai/codexis lighter to pull down too.
Follow more developer tool releases on Toris News.
Sources
Advertisement