Codex CLI v0.173.0 Stable: MCP Connection Sharing, Hook onFailure Blocking, and Enterprise Policy Controls
Release date: 2 December 2026, 02:16 UTC
Version: v0.173.0 stable
Install: npm install -g @openai/codex@0.173.0
Full diff: rust-v0.172.0…rust-v0.173.0
v0.173.0 is a governance and infrastructure release. The headline changes are MCP connection sharing across turns, a new onFailure: block option for hooks that lets a failed PreToolUse check stop a tool call dead, and a set of enterprise policy knobs for daemon update control and OAuth configuration. TUI polish covers status line alignment and several Markdown rendering fixes. All items below are drawn from the official release notes and merged pull requests.1
MCP: Connection Sharing by Default (#62552)
Codex now reuses MCP connections across turns rather than opening and closing them on every request. The change also adds support for older local MCP servers that require initialize as the first request before accepting tool calls.
For teams running multiple MCP servers, this reduces per-turn overhead — particularly for servers that are slow to start or that maintain state across the connection. The practical implication for codex exec pipelines: a server that was previously initialised freshly each turn now stays open for the session. If your server has side effects on initialisation, test whether repeated tool calls over a single connection behave correctly.
Hooks: onFailure: block (#62831)
Synchronous command and MCP tool hooks can now set onFailure to block. When a PreToolUse hook returns a failure and onFailure: block is configured, Codex prevents the tool from running.
Before this change, hook failures surfaced as warnings but did not stop tool execution. Now you can enforce policy at the hook layer. An example use case: a PreToolUse hook that checks whether a shell command targets a protected branch can now halt the command entirely if the check fails, rather than letting it proceed with a logged warning.
The onFailure key applies to synchronous hooks only. Async hooks do not block tool execution.
Status Line: Custom Alignment (#62569, #62637)
Status line rows now support alignment options: left, centre, right, or spread across the full terminal width. This is a cosmetic improvement for teams that have built custom TUI dashboards using the status line configuration.
Enterprise: Daemon Update Policy (#62690)
Administrators can now block scheduled and manual daemon updates via features.daemon_updates = false in requirements.toml or via MDM policy. This matters for fleet environments where uncoordinated self-updates are a compliance problem or where a specific Codex version is pinned by policy.
Enterprise: OAuth Endpoint Auto-Discovery (#62824)
When config_server.oauth is omitted from the configuration, Codex now automatically discovers OAuth endpoints published by the config server. This simplifies self-hosted config server setups: previously, every endpoint had to be listed explicitly.
Terminal Markdown Improvements (#62550, #62554, #62577)
Three Markdown rendering fixes ship in this release:
- Multiline labels on Mermaid flowchart arrows now render correctly.
- Labelled underbraces in display equations (
\underbrace) render as expected. \widetildeover single characters renders correctly.
These are niche improvements, but if you use Mermaid diagrams or LaTeX-style equations in replies, the visual output is now more reliable.
Bug Fixes
- Sidebar file previews refresh when files change on disk, even when an editor replaces the file atomically on save (#62583). Previously, an atomic-save editor (vim, most JetBrains tools) would leave the sidebar showing stale content.
- Image attachments create a private copy when an image path is pasted, so the attachment survives moving or deleting the original file (#62687).
- Agents overview refreshes Cloud thread names, status, and unread indicators when another client makes changes (#62858).
- Task mention picker now fuzzy-matches displayed titles and keeps recent threads in results (#62691).
- Guardian policies are picked up by running threads on config reload, sign-in, or sign-out without requiring a session restart (#62585, #62614).
What to Watch: v0.175.0 Alpha Series
v0.174.0 as a stable release has been skipped. The team branched directly to v0.175.0-alpha.1 (published 2 December, 06:22 UTC) after tagging v0.173.0 stable, with v0.174.0 development alphas serving as the staging ground for v0.173.0’s features. The first two v0.175.0 alphas include early Amazon Bedrock Runtime integration work (#65184, #65185): Codex CLI inheriting bundled tool capabilities on Bedrock profiles and Responses Lite mode for Bedrock. Watch the v0.175.0 series for official AWS-hosted deployment support.
Upgrade Checklist
npm install -g @openai/codex@0.173.0, thencodex --version.- If you use synchronous
PreToolUsehooks for policy enforcement, addonFailure: blockto any checks that should halt tool execution on failure. - If you manage a fleet, review whether
features.daemon_updates = falsefits your update policy. - If you use a self-hosted config server, test whether OAuth auto-discovery eliminates manual endpoint configuration in your setup.
- If you run MCP servers with initialisation side effects, verify that session-scoped connection reuse does not change their behaviour.
-
Release tag: rust-v0.173.0. Published 2026-12-02T02:16 UTC. ↩