From c7f21a852cc35c66b7936963cab2c80d6041a09c Mon Sep 17 00:00:00 2001 From: Won Park Date: Thu, 16 Jul 2026 00:31:24 +0000 Subject: [PATCH] Allow more time for image generation in code mode (#33459) ## What changed Update the image generation guidance to set a 120-second yield for the initial code-mode call and subsequent waits, then return the completed result with `generatedImage(result)`. GitOrigin-RevId: 85041db27a0b41d830014984518d95fdd2875bed --- codex-rs/ext/image-generation/imagegen_description.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/codex-rs/ext/image-generation/imagegen_description.md b/codex-rs/ext/image-generation/imagegen_description.md index 2d9b96187a..368aa10ea8 100644 --- a/codex-rs/ext/image-generation/imagegen_description.md +++ b/codex-rs/ext/image-generation/imagegen_description.md @@ -4,7 +4,7 @@ The `image_gen.imagegen` tool enables image generation from descriptions and edi - The user wants to modify an attached or previously generated image with specific changes, including adding or removing elements, altering colors, improving quality/resolution, or transforming the style (e.g., cartoon, oil painting). Guidelines: -- In code mode, pass the result to `generatedImage(result)`. +- imagegen needs a few minutes to finish. In code-mode, use the first-line @exec directive to give the initial call 120 seconds and the same yield for any waits that follow. Once it finishes, return the image with generatedImage(result). - Omit both `referenced_image_paths` and `num_last_images_to_include` when generating a brand new image. - For edits, use `referenced_image_paths` when every target image has a local file path. - If you have not seen a local image yet, use `view_image` to inspect it before editing.