Codex Adds True Transparent Background Image Generation

CodexView original changelog

Codex CLI 0.158.0 fixed one of the most persistently reported bugs in its built-in image tool: requests for a transparent background now reliably produce a real alpha channel instead of an opaque RGB PNG. The same release let Codex's image-editing tool accept file-backed conversation images, not just images already visible in the current chat context. Together the changes resolve several long-standing GitHub issues from developers who use Codex to generate game sprites, icons, and UI assets where transparency is essential rather than cosmetic.

Key Takeaways

  • Real alpha-channel PNGs at last, Codex's built-in image_gen tool can now explicitly request a transparent background and reliably preserve it, instead of silently returning an opaque RGB image.
  • The bug was worse with reference images, supplying a reference image to a generation request previously stripped out any transparency entirely, per GitHub issue #42743.
  • Image editing now accepts file-backed images, letting developers bring a previously saved asset back into Codex for another editing pass instead of only editing images already visible in the active conversation.
  • The fix directly resolves multiple long-open GitHub issues (#18636, #18905, #40572, #42743), making it one of the more concretely community-demanded changes in a recent Codex release.
  • This narrows the gap between Codex's built-in tool and OpenAI's Responses API, which already exposed native background: "transparent" controls that Codex users previously had to bypass the built-in tool to access.
  • The release also shipped smaller quality-of-life changes alongside it, including copy-on-select and Markdown-preserving copy in the fullscreen terminal UI.

Transparent Backgrounds, Finally Reliable

Codex CLI 0.158.0, released September 28, 2026, resolved one of the most persistently requested fixes in the tool's built-in image generation feature: reliable transparent backgrounds. For months, developers filed GitHub issues reporting that even explicit requests for a transparent background, an alpha channel, or "alpha=0 outside the subject" produced opaque RGB PNGs, sometimes wrapped in a fake checkerboard pattern meant to simulate transparency without an actual alpha channel. The problem grew worse whenever a reference image was supplied alongside the generation request, which silently stripped any transparency out of the result.

With 0.158.0, Codex's image generation and editing tools can now explicitly request a transparent background, giving the built-in image_gen tool a reliable path to true alpha-channel PNG output. This brings the built-in tool closer to parity with what OpenAI's Responses API already exposed directly through a background: "transparent" parameter, a capability that previously required stepping outside Codex's built-in tool and hitting the API separately.

Editing Images Saved to Disk

The same release let Codex's image-editing tool accept file-backed conversation images, not just images already visible in the chat context, such as attachments or images generated earlier in the same thread. This closes a gap for developers who save a generated asset, move to a different flow or a later session, and previously had no built-in way to hand that saved file back to Codex for another editing pass without re-attaching it into an active conversation.

Why It Matters

Both changes matter most to developers using Codex to produce game sprites, icons, UI elements, or composited web graphics, work where the alpha channel is not an aesthetic add-on but the entire point of the image. The transparency bug had been open across several GitHub issues for months, making this one of the more concretely community-requested fixes in a recent Codex release rather than a speculative improvement.

Also in 0.158.0

The release additionally added copy-on-select and right-click paste to Codex's fullscreen terminal UI, with Markdown formatting preserved on copy, OAuth client-secret support for MCP server connections, bearer-token authentication for exec-server WebSocket connections, and a default-on terminal input approval step for commands running with elevated permissions. It also fixed a cluster of sandbox bugs affecting Windows, Linux, and macOS, along with Mermaid diagram label rendering and command-completion event reporting.