Codex CLI 0.138.0: Desktop Handoff via /app, Image Path Exposure & Plugin Output Improvements

Codex

Codex CLI 0.138.0 introduces the /app command, which hands off the current CLI thread directly into Codex Desktop on macOS and Windows, bridging the terminal and desktop experiences without losing context. Local image attachments and standalone image generations now expose their saved file paths to the model, enabling reliable follow-up edits. The release also enhances plugin automation with richer structured --json output.


New Features

/app Command: Hand Off CLI Threads to Codex Desktop

Codex CLI 0.138.0 introduces the /app command, enabling users to seamlessly hand off their active CLI thread into Codex Desktop on both macOS and Windows. Previously, switching from a terminal session to the desktop app required starting a new thread from scratch, breaking continuity. With this release, the transition preserves thread context, and on Windows, workspace launches now open directly into Codex Desktop instead of stopping at a manual prompt. This improvement meaningfully connects the two primary Codex surfaces for users who move between terminal-first and GUI-first workflows.

Image Path Exposure for More Reliable Follow-Up Edits

Local image attachments and images generated by Codex's standalone image generation feature now expose their saved file paths to the model. In practice, this means developers can reference a generated image directly in follow-up prompts: asking Codex to use the file in a script, move it to a project directory, or build on it with further edits, without having to locate or manually specify the path. The change closes a gap that previously made image-related workflows awkward when chaining multiple steps.

Reasoning Effort Selection and Keyboard Fallbacks

Reasoning effort selection received improved flexibility with fallback keyboard shortcuts designed for terminals that lack Alt key support. Model-defined effort levels also now flow through in the advertised order, making the effort selection interface more predictable across different terminal environments.

Token Usage Tracking for App-Server Integrations

App-server integrations can now read account token usage data, and Codex authentication supports v2 personal access tokens across both CLI and app-server workflows. This enables teams running Codex in headless or automation contexts to track consumption at the account level.

Plugin Automation: Richer Structured Output

Plugin workflows gained richer structured output with --json support for add, remove, and marketplace commands, as well as marketplace source exposure in plugin list JSON output. Plugin detail data now includes default prompts, remote MCP servers, and unavailable app templates, giving automation scripts and integrations access to more complete plugin metadata.

Bug Fixes and Stability Improvements

Several quality-of-life issues in the TUI were addressed:

  • Goal workflows are more reliable: multiline paste in /goal edit no longer submits prematurely, idle auto-turns stay out of Plan mode, and goals stop auto-continuing after terminal turn failures.
  • Forked threads now preserve user-renamed titles instead of reverting to the original first-prompt name.
  • TUI streaming no longer adds extra blank space during output, and cancelled prompts reopen with the cursor positioned at the end for natural continuation.
  • Config write failures now display the underlying cause, simplifying diagnosis of validation and filesystem issues.
  • Startup resilience was expanded with /usr/bin/bash support, shorter Linux proxy socket paths, and pre-refresh of expired OAuth-backed MCP credentials.
  • Workspace instruction loading is more accurate for remote and symlinked workspaces, ensuring the correct AGENTS.md file is discovered.

Additionally, TUI startup was optimized through plugin discovery reuse and critical-path hook metadata loading, and resume --last is faster via state database-first session lookup.