Skip to content

Enabling CWD Saving for Image-Gen#13607

Merged
won-openai merged 7 commits intomainfrom
image-gen-save
Mar 6, 2026
Merged

Enabling CWD Saving for Image-Gen#13607
won-openai merged 7 commits intomainfrom
image-gen-save

Conversation

@won-openai
Copy link
Collaborator

Codex now saves the generated image on to your current working directory.

Copy link
Contributor

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 593d6bca6b

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Copy link
Contributor

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e66745c68b

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +195 to +200
let path = save_image_generation_result_to_cwd(
&ctx.turn_context.cwd,
&image_item.id,
&image_item.result,
)
.await?;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Avoid aborting turns when image save fails

handle_output_item_done propagates save_image_generation_result_to_cwd failures with ?. Any decode/write error (e.g. unwritable cwd, unexpected payload format) now fails the whole turn even though the model already produced an image response. This makes image generation brittle and can surface as turn-level failures unrelated to model output.

Useful? React with 👍 / 👎.

Copy link
Contributor

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 56dd35488d

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Copy link
Contributor

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e9cb0e09b5

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +460 to +471
if !generated.result.is_empty()
&& !generated.result.starts_with("data:")
&& !generated.result.starts_with("http://")
&& !generated.result.starts_with("https://")
&& !generated.result.starts_with("file://")
{
ts_msg!(
self,
"{} {} {}",
"generated image".style(self.magenta),
generated.call_id,
generated.result.style(self.dimmed)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Stop logging base64 image blobs to the terminal

ImageGenerationEnd now prints generated.result whenever it is not a URL/data URI. For normal image-gen responses this value is raw base64 image data, so this branch emits very large blobs to stderr, degrading CLI performance and flooding logs/output. The previous behavior only printed the call id, avoiding this payload dump.

Useful? React with 👍 / 👎.

@won-openai won-openai merged commit ee1a202 into main Mar 6, 2026
91 of 101 checks passed
@won-openai won-openai deleted the image-gen-save branch March 6, 2026 08:47
@github-actions github-actions bot locked and limited conversation to collaborators Mar 6, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants