Release notes
Codex CLI v0.158.0
New Features
- Configure copy-on-select and right-click paste in the fullscreen TUI. Copied transcript selections now preserve Markdown formatting. (#47639, #47896, #48118)
- Connect to MCP servers that require pre-registered OAuth client secrets, including through
codex mcp add --oauth-client-secret. (#47891) - Secure direct exec-server WebSocket connections with bearer tokens, including connections configured through app-server. (#47601, #47648)
- Image generation and editing can explicitly request transparent backgrounds, and edits now accept file-backed conversation images. (#47484, #47956)
- Terminal input approval is enabled by default for commands running with elevated permissions; runtime-only grants no longer cause unnecessary reviews. (#47799, #48073)
Bug Fixes
- Fixed Windows sandbox failures involving ordinary Windows 10 paths, rejected stored credentials, and large permission policies. (#47672, #47695, #47919)
- Fixed Linux sandbox startup with nested writable roots and preserved Git metadata protections across writable roots on Linux and macOS. (#47623, #47974)
- macOS patch operations now recognize system path aliases covered by existing permissions, avoiding unnecessary approval prompts. (#47879)
- Approval reviews now retry when new user input arrives, so a status question does not automatically abort a pending action. (#47819)
- Mermaid flowcharts now render quoted labels and ampersands; unsupported diagrams explain why they fall back to source. (#47572, #47678)
- Command completion events now include early output and report process-launch failures to clients. (#47529, #47665)
Changelog
Full Changelog: https://github.com/openai/codex/compare/rust-v0.157.0...rust-v0.158.0
- #47441 Use secondary text styling for the transcript footer shortcut hint @etraut-openai
- #47447 Extract WebSocket authentication into
codex-websocket-auth@euroelessar - #47458 Parallelize instruction refresh and tool preparation @hlevy-openai
- #47484 Add explicit background control to image generation @alicec-oai
- #47520 Route session agent operations through
AgentControl@jif-oai - #47529 Emit command lifecycle events for unified exec launch failures @steipete-oai
- #47536 Route agent lookups and V2 context through
AgentControl@jif-oai - #47539 Test interrupted one-shot command launch failure persistence @jif-oai
- #47540 Add an option to disable multi-agent v2 direct messaging @jif-oai
- #47565 Classify rollout read failures by reason and progress @jif-oai
- #47568 Record sandbox backends in command execution analytics @iceweasel-oai
- #47571 Wait for idle before injecting remote compaction test history @felixxia-oai
- #47572 Explain Mermaid rendering fallbacks in the TUI @etraut-openai
- #47582 Retain assistant context for Guardian authorization reviews @felixxia-oai
- #47584 Preserve streamed assistant message order in retained context @felixxia-oai
- #47585 Preserve delivered assistant messages in Guardian retained context @felixxia-oai
- #47589 Keep unfinished link destinations out of rich streaming previews @etraut-openai
- #47590 Serialize numeric custom reasoning effort as JSON numbers @dylan-hurd-oai
- #47591 Stream daemon executable hashing off the async runtime @etraut-openai
- #47596 Refresh realtime context for each model request @reia-oai
- #47597 Guard prerelease channel and canary updates against older versions @imac-oai
- #47601 Add opt-in WebSocket authentication to exec-server @euroelessar
- #47603 Add a reap-only drop policy for child processes @charliemarsh-oai
- #47604 Extend child commands with session and descriptor controls @charliemarsh-oai
- #47605 Route pipe processes through the shared child launcher @charliemarsh-oai
- #47610 Use native POSIX spawning for command hooks @charliemarsh-oai
- #47611 Use the shared process launcher for Unix shell snapshots @charliemarsh-oai
- #47612 Launch Linux pipe processes through a fresh setup helper @freeqaz-openai
- #47613 Expand Linux spawn-helper lifecycle test coverage @charliemarsh-oai
- #47617 Route Linux PTY launches through the process setup helper @charliemarsh-oai
- #47618 Prefer Shift-arrow hints for queued messages and questions @imac-oai
- #47619 Add bounded buffering for global operation metrics @celia-oai
- #47620 Add portable project trust lookup APIs @seanh-oai
- #47623 Fix read-only metadata mount ordering for nested writable roots @jif-oai
- #47624 Recognize
user_messagetools in Guardian authorization context @ankushg - #47625 Allow history and notes without experimental context capability @pmccrary-oai
- #47629 Route V2 child loading through
AgentControl@jif-oai - #47630 Bind Guardian reviews to the action's target environment @jif-oai
- #47633 Route message board agent resolution through the selected controller @jif-oai
- #47635 Overlap startup WebSocket preconnect with tool discovery @bromano-oai
- #47638 Classify retryable exec-server preparation errors by type @mtsui-oai
- #47639 Add configurable copy-on-select for transcript selections @fcoury-oai
- #47641 Honor Retry-After and preserve server retry deadlines @anp-oai
- #47642 Add model-specific prefixes to indirect tool descriptions @rhan-oai
- #47647 Apply Guardian computer-use review to the Browser connector @johnl-oai
- #47648 Support bearer tokens for app-server executor connections @euroelessar
- #47649 Add opt-in OTLP logging for final agent responses @xli-oai
- #47653 Attach inherited rollout history to diagnostic reports @dkovalenko-oai
- #47654 Make Linux descriptor cleanup fork-safe @yuzhu-oai
- #47655 Bump the exec-server stable compatibility test to Codex 0.156.1 @imac-oai
- #47657 Restrict the default Bedrock GovCloud model catalog @jackz100
- #47662 Expose tool dispatch and timing observations to extensions @euroelessar
- #47663 Preserve managed network policy in route-aware transports @jackz100
- #47665 Preserve early unified exec output in completion events @sdcoffey
- #47670 Support model-specific descriptions for agent message board tools @eknight-oai
- #47672 Fix no-reparse directory opens on Windows 10 @zm-oai
- #47673 Clarify registered Windows sandbox setup errors @zm-oai
- #47677 Support model catalog overrides for MCP resource tool specs @rhan-oai
- #47678 Support quoted labels and ampersands in Mermaid flowcharts @etraut-openai
- #47679 Add extension hooks for model requests and response streams @euroelessar
- #47680 Add exec-server RPC timing and process startup tracing @anp-oai
- #47683 Add executor capability discovery V2 infrastructure @TAFOYA-OAI
- #47686 Make thread-owned Guardian context always enabled @felixxia-oai
- #47688 Remove legacy Guardian authorization evidence paths @felixxia-oai
- #47689 Make Guardian thread context capture unconditional @felixxia-oai
- #47690 Remove obsolete Guardian context capture mode branches @felixxia-oai
- #47691 Materialize rollout persistence for pending inter-agent messages @dermanyang-oai
- #47693 Configure curl retries for DotSlash installation in CI @anp-oai
- #47695 Repair rejected Windows sandbox credentials during provisioning @zm-oai
- #47696 Avoid the shutdown timeout in the lagged-event test @jgershen-oai
- #47698 Allow WebSocket test server shutdown while waiting for requests @jgershen-oai
- #47701 Allow idle threads to prewarm and repair WebSocket connections @vkg-oai
- #47703 Preserve account network policy for ChatGPT backend requests @jackz100
- #47704 Fix spawn flag typing and isolate project configuration tests @seanh-oai
- #47709 Route resume prewarm through the cached WebSocket session @vkg-oai
- #47712 Update unified exec output buffers atomically @sdcoffey
- #47713 Reduce dependency coupling in shared configuration crates @aibrahim-oai
- #47714 Preserve tool result metadata more selectively under size limits @ningyi-oai
- #47717 Avoid recursive TUI event dispatch for model picker selections @etraut-openai
- #47741 Attribute tool telemetry to the invoking turn's product SKU @rennie-openai
- #47742 Honor network policy in history notes and image generation extensions @jackz100
- #47745 Skip startup prewarm preparation when the WebSocket is ready @vkg-oai
…