Codex CLI 0.139.0: Web Search Now Available Directly in Code Mode
Codex CLI 0.139.0 introduces web search in code mode, allowing the agent to perform standalone web searches directly from within code execution context, including from nested JavaScript tool calls, and receive plaintext results. This closes a longstanding gap where code mode lacked live internet access that other Codex surfaces already had. The release also improves MCP tool compatibility by preserving oneOf and allOf schema structures, ensuring richer third-party connectors work correctly, and adds several quality-of-life fixes including corrected argument parsing for codex resume --last and codex fork --last.
Sources & Mentions
4 external resources covering this update
Web Search Arrives in Code Mode
Codex CLI 0.139.0, released June 9, 2026, brings a capability that developers have long requested: standalone web search directly inside code mode. Previously, web search was available in other Codex surfaces but not accessible from within code mode's execution context. With this release, code mode can now call web search directly, including from nested JavaScript tool calls, and receive plaintext results that feed seamlessly into subsequent operations.
This change is significant for agentic workflows. When Codex is operating in code mode and encounters a question about an unfamiliar API, a library version, or an error message, it can now look it up on the fly without the developer needing to break the flow and provide context manually. Standalone web searches can also run in parallel, meaning code mode does not have to wait for a search to complete before continuing other tasks.
Improved MCP Tool Schema Compatibility
A second meaningful change in 0.139.0 addresses compatibility with MCP (Model Context Protocol) tools. Tool and connector input schemas now preserve oneOf and allOf structures rather than flattening them during processing. For large schemas, the CLI also keeps more shallow structure intact when compacting, preventing silent truncation that previously broke integrations with richer MCP tools.
For developers who have built custom MCP connectors or who rely on third-party plugins with complex input schemas, this fix eliminates a category of hard-to-debug failures where tool calls would silently degrade because their schema was being simplified before it reached the model.
Bug Fixes and Diagnostics Improvements
Several quality-of-life fixes ship alongside the headline features:
- Resume and fork argument parsing: codex resume --last "..." and codex fork --last "..." now correctly treat any trailing argument as the initial prompt for the resumed session, rather than misreading it as a session ID. This was a common source of confusion for users relying on these commands in scripts or aliases.
- MCP startup warnings: Warnings originating from subagents now stay in their owning thread, eliminating duplicate alerts and stuck spinner states that could appear in the TUI.
- Image edit routing: Image edits now use the exact referenced file path rather than inferring the target from conversation history, producing more reliable results in multi-image sessions.
- URL linkification: Bare URLs containing tildes in TUI output are now fully clickable instead of being truncated before the tilde character.
- Thread reset preservation: The /new, /clear, and /fork commands now correctly maintain cloud-managed requirements and feature flags across resets.