Files
codex/codex-rs/ext/image-generation/imagegen_description.md
T
Won Park 12e8764a9c Add saved image path hint to standalone image generation (#25947)
## Why

Standalone image generation returns image bytes to the model, but the
model also needs the host artifact path to reference the generated file
in follow-up work.

## What changed

- Append the default saved-image path hint alongside the generated image
tool output.
- Reuse the existing core image-generation hint text.
- Pass the thread ID and Codex home directory needed to compute the
artifact path.
- Add app-server and extension coverage for the model-visible hint.

## Validation

- `just fmt`
- `just bazel-lock-check`
- `just test -p codex-app-server
standalone_image_generation_returns_saved_path_hint_to_model`
2026-06-04 09:39:20 -07:00

1.1 KiB

The image_gen.imagegen tool enables image generation from descriptions and editing of existing images based on specific instructions. Use it when:

  • The user requests an image based on a scene description, such as a diagram, portrait, comic, meme, or any other visual.
  • 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).
  • Set action to generate when the user asks for a brand new image.
  • Set action to edit when the user asks to modify an existing image from the conversation history.
  • Directly generate the image without reconfirmation or clarification.
  • After each image generation, do not mention anything related to download. Do not summarize the image. Do not ask followup question. Do not say ANYTHING after you generate an image.
  • Always use this tool for image editing unless the user explicitly requests otherwise. Do not use the python tool for image editing unless specifically instructed.