Skip to content

[TPP-502] fix(imagegen): avoid duplicate markdown image links#31485

Open
kunyao-liu wants to merge 2 commits into
mainfrom
TPP-502
Open

[TPP-502] fix(imagegen): avoid duplicate markdown image links#31485
kunyao-liu wants to merge 2 commits into
mainfrom
TPP-502

Conversation

@kunyao-liu

Copy link
Copy Markdown

Summary

  • Tell the model that generated images are already displayed to the user.
  • Prevent Markdown links or embeds for the generated image and unchanged copies.
  • Preserve the existing saved-path guidance for follow-up image work.

Root cause

The shared image-generation output hint exposed the saved image path without explaining that the client had already rendered the generated-image item. The model could then repeat the same image as a Markdown image or file link.

Validation

  • just test -p codex-image-generation-extension
  • git diff --check
  • cargo fmt --manifest-path codex-rs/Cargo.toml --all

Attempted just test -p codex-core handle_output_item_done_records_image_save_history_message; local linking of the large codex-core test binary failed before the test ran.

@kunyao-liu kunyao-liu marked this pull request as ready for review July 7, 2026 22:18
@kunyao-liu kunyao-liu requested a review from a team as a code owner July 7, 2026 22:18
@kunyao-liu kunyao-liu changed the title fix(imagegen): avoid duplicate markdown image links [TPP-502] fix(imagegen): avoid duplicate markdown image links Jul 7, 2026
@kunyao-liu kunyao-liu marked this pull request as draft July 7, 2026 22:19

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

Copy link
Copy Markdown
Contributor

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: 7a7084857d

ℹ️ 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 thread codex-rs/core/src/context/image_generation_instructions.rs Outdated
Comment thread codex-rs/core/src/context/image_generation_instructions.rs Outdated
Comment thread codex-rs/core/src/context/image_generation_instructions.rs Outdated
@kunyao-liu kunyao-liu marked this pull request as ready for review July 7, 2026 23:14

Copy link
Copy Markdown
Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown
Contributor

Codex Review: Didn't find any major issues. Another round soon, please!

Reviewed commit: cebe14fa2f

ℹ️ 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".

@kunyao-liu kunyao-liu requested a review from won-openai July 7, 2026 23:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant