Skip to content

Preserve uploaded image file IDs in user message display history - #46258

Merged
copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/55e7ab97925b5db049c5c2403d90349635eee740
Sep 17, 2026
Merged

copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/55e7ab97925b5db049c5c2403d90349635eee740

Conversation

@copyberry

@copyberry copyberry Bot commented Sep 17, 2026 •

Copy link
Copy Markdown

Preserve uploaded image file IDs in user message display history

Why

Image preparation replaces uploaded images with file references in model history, but user message events still retain the original local paths or inline image URLs. Live and persisted display history should carry the prepared file IDs as well.

What changed

  • Prepare images before emitting user message events, and copy uploaded file IDs into the corresponding user inputs.
  • Track original input positions through content expansion so failed image reads, omitted inputs, and duplicate URLs do not misassociate images.
  • Preserve text spans, image detail settings, and inputs without a prepared file reference.

Testing

Add a protocol test for image position mapping and an integration test covering file IDs in model requests, live user message events, and persisted display history, including failed images and duplicate URLs.

)

## Why

Image preparation replaces uploaded images with file references in model history, but user message events still retain the original local paths or inline image URLs. Live and persisted display history should carry the prepared file IDs as well.

## What changed

- Prepare images before emitting user message events, and copy uploaded file IDs into the corresponding user inputs.
- Track original input positions through content expansion so failed image reads, omitted inputs, and duplicate URLs do not misassociate images.
- Preserve text spans, image detail settings, and inputs without a prepared file reference.

## Testing

Add a protocol test for image position mapping and an integration test covering file IDs in model requests, live user message events, and persisted display history, including failed images and duplicate URLs.

GitOrigin-RevId: 55e7ab97925b5db049c5c2403d90349635eee740
@copyberry
copyberry Bot force-pushed the copyberry/codex-internal-to-codex-oss/55e7ab97925b5db049c5c2403d90349635eee740 branch from 74e15b9 to 96aca98 Compare September 17, 2026 17:17
@github-actions

Copy link
Copy Markdown
Contributor


Thank you for your submission, we really appreciate it. Like many open-source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution. You can sign the CLA by just posting a Pull Request Comment same as the below format.


I have read the CLA Document and I hereby sign the CLA


You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot.

@copyberry
copyberry Bot merged commit 96aca98 into main Sep 17, 2026
@copyberry
copyberry Bot deleted the copyberry/codex-internal-to-codex-oss/55e7ab97925b5db049c5c2403d90349635eee740 branch September 17, 2026 17:17
@github-actions github-actions Bot locked and limited conversation to collaborators Sep 17, 2026
@callamd
callamd deployed to issue-triage September 17, 2026 17:30 — with GitHub Actions Active
@callamd
callamd deployed to issue-triage September 17, 2026 17:30 — with GitHub Actions Active
@callamd
callamd deployed to issue-triage September 17, 2026 17:30 — with GitHub Actions Active

This branch was successfully deployed

1 active deployment
issue-triage — 96aca987 Deployed Sep 17, 2026 by ChaosRealmsAI via Identify potential duplicates (all issues) #46367
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.

6 participants