OpenAI Codex release notes: 0.158.0 adds transparent backgrounds
Part of the series: OpenAI Codex release notes

OpenAI Codex CLI 0.158.0 can explicitly request transparent backgrounds when generating or editing images. The release also fixes edits involving images stored as file references in the conversation. Codex CLI is OpenAI's terminal-based coding agent.
OpenAI Codex release notes: choose a transparent background
Version 0.158.0 was published on September 28 and is the stable npm version when checked on September 29. This change concerns the Codex image tool. Installing this release does not by itself mean every account gains image generation access.
Source: OpenAI Codex CLI 0.158.0 release notes.
The image tool gains the transparent_background argument. Setting it to true requests transparency. Setting it to false, or omitting it, produces an opaque background instead of the previous automatic choice. The tool guidance also says to preserve existing transparency during edits unless the user requests a change.
Source: OpenAI: Add explicit background control to image generation.
Edits now accept both image_url and file_id. This fixes failures when editing an earlier image supplied as a file reference in a message or tool output. Image selection order is preserved.
Source: OpenAI: Support file references in image edit requests.
Human step: update the CLI
If you use npm, run this in your terminal:
npm install -g @openai/[email protected]
Source: OpenAI Codex changelog, September 28.
Short example: use the new Codex feature
When the image tool is available and the image is already in the conversation, ask Codex:
Remove the background from the latest product image. Keep the product unchanged and explicitly request a transparent background with the image tool. If the tool is unavailable, say so.
- The background should be transparent, not a drawn checkerboard.
- The product's shape and colors should be preserved.
- Check the edges against both light and dark backgrounds before using the image.
The Forge newsletter
Get new articles in your inbox
Pick the topics you care about. No noise, at most one email a week.
We follow GDPR. Unsubscribe anytime.


