Skip to content
Back to blog
IADevOpsHomelab

Codex CLI 0.152.0 adds MCP output limits

A new Codex setting helps prevent noisy MCP logs from consuming an agent’s context.

Ismael Catala3 min read

The problem is not MCP, it is the output

Connecting Codex to a Laravel project, Docker, or a homelab through MCP is useful until a tool returns far more text than the agent needs. A log command, stack trace, or poorly filtered response can take up valuable context without adding much to the task. That leaves the agent with less room for code, instructions, and the information that actually matters.

Codex CLI 0.152.0 adds output limits for individual MCP tools. The setting lives under a specific tool in an MCP server configuration: mcp_servers.<id>.tools.<tool>.output_token_limit. The value must be positive and lets you cap how much of a tool response is retained in the conversation context.

Put the limit where the noise starts

This is especially useful for tools that retrieve logs, large lists, or infrastructure diagnostics. In a Laravel MCP server, that could be a tool that retrieves application errors; in a Docker integration, it could be a tool that reads container output. The same applies to homelab services that return detailed status data, event streams, or full inventories.

The important part is that the setting is per tool, rather than a blanket rule for the entire MCP server. A short database query may need to return everything, while a log-oriented tool will usually benefit from a controlled response. Before setting a limit, I would check what every tool returns and decide whether it should summarize or filter data before sending it back.

Planning is now opt-in

There is also a change to update_plan. The planning tool is disabled by default, so workflows that rely on it need to enable it explicitly. The relevant configuration is:

[tools.update_plan]
enabled = true

This will not matter much if you never use visible plans while Codex works. But if your project instructions, automations, or day-to-day workflow expect planning updates, it is worth checking after the upgrade. Otherwise, the agent will not have that tool available even if your instructions refer to it.

The fine print

output_token_limit does not make an MCP tool secure, and it does not replace permission controls. Options such as enabled_tools and disabled_tools still matter for restricting which tools are exposed, while approval settings can be configured at server and tool level. Reducing output keeps context under control, but it does not fix a tool that exposes secrets, performs unsafe actions, or retrieves more data than necessary.

It is not a solution for missing important details either. If you are investigating a specific failure, a limit that is too low may remove the log line or diagnostic detail you need. In that situation, I would rather improve the MCP tool with filters, pagination, or targeted search than ask the agent to process a full dump.

A small change for infrastructure-connected agents

For agents working with Laravel, Docker, and self-hosted services, this is a practical change because it forces better output design. An MCP server should not act as a direct pipe that sends everything a system produces into the model. It should return bounded, useful data while granting only the access required for the task.


Source: Codex CLI changelog Official documentation: Codex configuration reference