Source · release
Codex CLI 0.173.0
Summary
Codex CLI 0.173.0 adds hooks that block when they fail, shares MCP connections by default, gives admins a policy to block daemon updates, and adds alignment options for custom status lines. Release 0.175.0-alpha.1 followed within hours, with no notes.
Key points
- Hooks that block on failure: synchronous command and MCP-tool hooks can set
onFailuretoblock. A failingPreToolUsehook then stops the tool call instead of letting it run. Use this for guard hooks such as secret scanners or path checks. Claude Code and its Agent SDK added a similar option in November. - Shared MCP connections: MCP server connections are now shared by default. Older
local servers that need
initializefirst still work. - Admin controls:
- Set
features.daemon_updates = falsein a managedrequirements.tomlor an MDM policy to block scheduled and manual daemon updates. - If
config_server.oauthis omitted, Codex discovers the OAuth endpoints from the config server.
- Set
- Status line: custom status line items can be aligned left, centre, or right, or spread across the width.
- The npm packages are smaller.
- Upgrade:
npm i -g @openai/codex@latest(or your package manager).
Why it matters
With blocking hooks, a Codex hook can enforce a policy instead of only advising. This brings Codex closer to Claude Code's hook model, so the same guard scripts can protect both agents.