# Codex CLI 0.158.0 — copy-on-select and MCP servers with OAuth secrets

> Codex CLI's new release makes the fullscreen view easier to copy from and opens it to OAuth-protected MCP servers.

- Org: OpenAI
- Date: 2026-09-28
- Category: tool
- Source: https://github.com/openai/codex/releases/tag/rust-v0.158.0
- Canonical page: https://ai-tldr.dev/releases/openai-codex-cli-0-158/

## In short

Codex CLI 0.158.0 adds copy-on-select and right-click paste to the fullscreen view, and connects to MCP servers that need a pre-registered OAuth client secret. Elevated commands now ask before taking terminal input.

## What it is

Release 0.158.0 of OpenAI's Codex CLI lets you set copy-on-select and right-click paste in the fullscreen terminal UI, and copied transcript text now keeps its Markdown formatting. It also adds `codex mcp add --oauth-client-secret` for MCP servers that need a pre-registered OAuth client secret.

## How it works

Direct WebSocket connections to the exec server can now be secured with bearer tokens, including ones set up through app-server. Image generation and editing can ask for a transparent background, and edits accept images stored as files in the conversation. Commands that run with elevated permissions now need approval before they read terminal input, while runtime-only grants no longer trigger extra reviews.

## Why it matters

Teams whose internal tools sit behind OAuth can now plug them into the Codex agent without a workaround. The release also fixes sandbox bugs on all three platforms: failures on standard Windows 10 paths, Linux startup with nested writable roots, and needless approval prompts for macOS system path aliases.

## Who it's for

Codex CLI users and teams running private MCP servers

## Try it

npm i -g @openai/codex@0.158.0

## Links

- [Release Notes](https://github.com/openai/codex/releases/tag/rust-v0.158.0)
- [Full Changelog](https://github.com/openai/codex/compare/rust-v0.157.0...rust-v0.158.0)
- [Repository](https://github.com/openai/codex)
- [Previous Release](https://github.com/openai/codex/releases/tag/rust-v0.157.0)
