Codex 0.158.0
Highlights in this release
New 7
Fullscreen interface supports copy-on-select and right-click paste while preserving formatting
Browsing or organizing conversation history in the full-screen terminal interface now aligns more closely with everyday habits. ⟦Much like selecting text in a standard word processor, highlighting text with the mouse copies it directly to the clipboard, right-clicking pastes it, and content with headings and lists preserves its original layout after copying.⟧ You can now enable copy-on-select and right-click paste in settings. Content copied from chat history fully preserves Markdown syntax, so it no longer loses formatting when pasted into other note-taking tools.
Original changelog
Configure copy-on-select and right-click paste in the fullscreen TUI. Copied transcript selections now preserve Markdown formatting. (#47639, #47896, #48118)
MCP servers support pre-registered secret authentication
When you want to connect external services that require special authentication, you can now directly provide a dedicated key to establish the connection. ⟦Think of an access gate that only accepts pre-registered passes: Codex can now connect using the pre-registered secret required by the server.⟧ Codex now supports MCP servers that require a pre-registered OAuth client secret. You can add a server directly by running a command with dedicated flags in the terminal: ```bash codex mcp add --oauth-client-secret ``` This allows you to smoothly connect and integrate authentication mechanisms that require pre-registered secrets into your daily workflow.
Original changelog
Connect to MCP servers that require pre-registered OAuth client secrets, including through codex mcp add --oauth-client-secret. (#47891)
WebSocket connections to execution server add token authentication
When the background execution server communicates in real time with the main program, security protection for the transmission channel is upgraded once again. ⟦A security gate is now installed on the dedicated communication channel: while any connected line used to transmit messages freely, every entry and exit now requires presenting an exclusive pass.⟧ Codex now uses a bearer token to protect direct WebSocket connections to exec-server. This security protection also covers connection channels configured through app-server. Through token authentication, connections prevent unauthorized external access and ensure communication security.
Original changelog
Secure direct exec-server WebSocket connections with bearer tokens, including connections configured through app-server. (#47601, #47648)
Image generation supports transparent backgrounds and direct editing of conversation images
When asking AI to create or modify image assets, generated images can be placed directly into presentations and webpages more conveniently. ⟦Like painting on a transparent canvas, completed graphics can overlay onto presentations or webpages, while images saved as files in the conversation can serve as source assets for subsequent edits.⟧ You can now explicitly request a transparent background when issuing prompts to generate or modify images. The image editing feature also supports reading images saved as files directly from the conversation history, allowing you to continue adjusting visuals without re-exporting and uploading.
Original changelog
Image generation and editing can explicitly request transparent backgrounds, and edits now accept file-backed conversation images. (#47484, #47956)
Permission review queries no longer interrupt actions and reduce repeated confirmation prompts
Asking questions or checking status while waiting for command review no longer accidentally interrupts the operation. ⟦Picture asking a clerk for a quick status update while processing paperwork: the clerk answers your question and continues handling the application without voiding the entire form, nor making you wait in line again for already stamped approvals under a different name.⟧ If new text is entered while in a pending review state, the review process automatically retries, ensuring status inquiries do not directly interrupt operations awaiting execution. For commands executed with elevated permissions, terminal input review is enabled by default, and runtime-only permissions no longer trigger redundant audits. When applying fixes on macOS, the system recognizes path aliases covered by existing permissions, avoiding duplicate confirmation prompts.
Original changelog
Terminal input approval is enabled by default for commands running with elevated permissions; runtime-only grants no longer cause unnecessary reviews. (#47799, #48073)
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 support quotes and symbols, with fallback explanations for unsupported charts
Terminal chart compatibility is now more comprehensive when asking AI to generate flowcharts or architecture diagrams. ⟦Instead of breaking upon encountering special symbols, the screen renders layouts correctly, and if an unrenderable chart type appears, it clearly notes the reason and falls back to the original text draft for review.⟧ Mermaid flowcharts now properly render labels containing double quotes and "&" symbols. When encountering currently unsupported chart types, the screen clearly explains the reason for the fallback, preventing any confusion.
Original changelog
Mermaid flowcharts now render quoted labels and ampersands; unsupported diagrams explain why they fall back to source. (#47572, #47678)
Command completion events include early output, and process launch failures report to clients
When monitoring command execution through a client application, initial output could previously be missed, and diagnosing why a process failed to launch was difficult. ⟦A post-broadcast recording now attaches the opening footage, and if broadcasting equipment fails to start altogether, the failure is reported directly to the viewer.⟧ Command completion events now include early output generated at the very beginning of execution. When launching a process fails, the error is actively reported to the client, making troubleshooting much more efficient.
Original changelog
Command completion events now include early output and report process-launch failures to clients. (#47529, #47665)
Fixed 1
Fixes cross-platform sandbox path, credential, and write permission issues
Stability is improved when running commands inside sandboxes across different operating systems. ⟦Adjusting the access points and boundaries of an isolated space ensures that standard Windows 10 paths and nested writable roots are handled properly, while preserving protections for Git metadata.⟧ On Windows, issues causing sandbox failures with standard Windows 10 paths, rejected saved credentials, and oversized permission policies have been fixed. On Linux, an error where sandboxes failed to start when containing nested writable roots has been resolved. Across multiple writable roots on Linux and macOS, protection mechanisms for Git metadata are also fully preserved.
Original changelog
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)