Codex CLI v0.173.0: blocking PreToolUse hooks, shared MCP connections, and aligned status lines#

Published by

Part of the Codex CLI Version Tracker series. | Codex on GitHub | Official Changelog

Codex CLI 0.173.0 follows 0.172.0 with synchronous hooks that can block a tool call, MCP connections shared by default, and custom status lines that align or spread their rows across the terminal. The same release lets administrators block daemon updates and refreshes approval and Guardian policies on threads that are already running.

A hook can now stop a tool#

Supported synchronous command and MCP tool hooks can set onFailure to block.[1] When a PreToolUse check fails, the tool it guards does not run. The check decides whether the call proceeds.

Two configuration surfaces carry confirmed effects this release.

SettingWhat It Does
onFailure = blockOn a supported synchronous command or MCP tool hook, a failed PreToolUse check prevents the tool from running.[1]
features.daemon_updates = falseSet in managed requirements.toml or local MDM policy, blocks both scheduled and manual daemon updates.[1]

MCP connections, shared by default#

Codex shares MCP connections by default and supports older local servers that require initialize as their first request.[1] When config_server.oauth is omitted, Codex discovers the OAuth endpoints a config server publishes.[1]

Status lines and terminal Markdown#

Custom status lines can align their items left, center, or right, or spread them across the terminal width.[1] Terminal Markdown rendering adds multiline labels on Mermaid flowchart arrows, labeled underbraces in display equations, and \widetilde over a single character.[1]

Fixes#

Open sidebar previews refresh when a file changes on disk, including when an editor replaces the file on save. Pasting an image path creates a private copy, so the attachment survives moving or deleting the original before you send. The Agents overview refreshes Cloud thread names, status, and unread indicators when another client makes a change, and the task mention picker fuzzy-matches the titles you see while keeping recent threads in the results. Codex can report why a server rejected a WebSocket request, including a request that was too large, even when the upload stalls or fails.[1]

Installing or updating Codex downloads less: the npm release tarballs are smaller this release.[1]

Policy changes reach work already running#

Running threads pick up updated approval requirements and Guardian policies when you reload configuration, sign in, or sign out.[1] Alongside hooks that can block a PreToolUse call and the administrator switch that stops daemon updates, the enforcement surface this release acts on live state: a policy or approval rule that changes applies to a thread already in progress.

Execution policy rules now live in a separate crate, and thread context ID allocation is centralized in one place.[1] Both are structural moves inside the runtime rather than user-visible features.

The refresh is tied to explicit events: a configuration reload, a sign-in, or a sign-out. A policy edited while a thread runs takes effect at the next of those, which is the point to trigger after changing an approval requirement on an open session.

All trademarks and software referenced belong to their respective owners.

Sources#

  1. Codex CLI release notes, rust-v0.173.0

Previous Codex CLI analysis: v0.172.0 (November 24, 2026)

All 22 Codex CLI analyses: Codex CLI Version Tracker · Official Codex CLI changelog

Get the weekly digest

New Claude Code, Codex, Gemini CLI and OpenCode guides and release analyses, once a week, plus occasional notes.

One email a week plus occasional notes. Confirm by email; unsubscribe from any issue. Privacy