# Codex CLI 0.151.0 — extensions can rewrite MCP tool results

> An extension can now sit between an MCP tool and the model in Codex CLI, reading or replacing the result before it reaches the context.

- Org: OpenAI
- Date: 2026-08-29
- Category: tool
- Source: https://github.com/openai/codex/releases/tag/rust-v0.151.0
- Canonical page: https://ai-tldr.dev/releases/openai-codex-cli-0-151/

Codex CLI 0.151.0 lets an extension inspect or replace the result of an MCP tool call before the model reads it. The release also adds a grace period for discovering tools from optional MCP servers and tightens sandbox handling.

## What it is

Extension hooks over MCP results are the headline of Codex CLI 0.151.0, released on August 29. Extensions can inspect or replace what an MCP tool returns before the model ever sees it. The release also makes the wait for tool discovery from optional MCP servers configurable, so a slow or absent server no longer holds up a session on a fixed timer.

## How it works

Plugin catalogs in this build merge per-repository configuration rather than replacing it, and an invalid project marketplace is now reported instead of silently hiding the plugins that are fine. Several fixes go to the sandbox: restored permission profiles survive across TUI turns, `/cd` can no longer weaken sandbox restrictions, and remote sandbox enforcement uses the executor's real home directory, operating system and path conventions. Nested subagent tokens now count toward the root goal budget.

## Why it matters

Filtering a tool result before it enters the context is the piece extension authors needed to redact secrets, trim noisy output, or swap in a cached answer without patching Codex itself. For everyone else the value is in the sandbox work: a permission profile that quietly reset between turns, or a `/cd` that loosened restrictions, are the kind of bugs that turn a safe agent run into an unsafe one.

## Who it's for

Codex CLI users and extension authors

## Try it

npm install -g @openai/codex@0.151.0

## Links

- [Release Notes](https://github.com/openai/codex/releases/tag/rust-v0.151.0)
- [GitHub Repo](https://github.com/openai/codex)
- [All Releases](https://github.com/openai/codex/releases)
