Repository navigation
Conversation
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Contributor
ApprovabilityVerdict: Approved at Macroscope's review found this PR approvable — This is a focused server-side fix that translates Codex inline image outputs into the image format already handled by the existing work-log and asset pipeline, while leaving other tool content unchanged. It adds targeted coverage and does not alter schemas, defaults, clients, deployment, or static-analysis configuration. You can add or adjust custom eligibility rules. Learn more. |
Contributor
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Images returned by Codex tools (for example
tools.image_gen__imagegeninsidefunctions.exec, forwarded withgeneratedImage(result)) never appear in the chat on desktop or Android, although the PNG is saved. See #19059.Codex reports tool image output as
{type: "inputImage", imageUrl: "data:image/png;base64,..."}. The tool-output image pipeline (readToolOutputImageinpackages/shared/src/toolOutput.ts, thetool-output-imageasset route and the web/mobile renderers) only recognises{type: "image", mimeType, data}, so the Codex block is never treated as an image.Change
codexDynamicToolOutputinCodexAdapterV2.tsnow translatesinputImageitems carrying a base64data:image/*URL into theimageblock shape the existing pipeline already handles. Other content items, including non-data URLs, are unchanged. No changes to shared code or clients.Scope and approval
Fixes #19059, a bug report currently labelled
needs more info; no maintainer approval comment exists yet. I believe it qualifies as a small, focused fix (one adapter function) for the shape mismatch described above. Happy to adjust or close if the maintainers prefer a different approach, for example acceptinginputImagein the shared reader.Verification
Run on Node 26.12.1 with pnpm 12.14.0:
vp test run src/orchestration-v2/Adapters/CodexAdapterV2.test.ts -t codexDynamicToolOutputinapps/server: 1 passed, 75 skipped. The new test checks that aninputImagedata URL becomes animageblock while text and non-data URLs are unchanged.pnpm run typecheckinapps/server: 0 errors (Effect style suggestions only).Not checked: I did not confirm in the running desktop or mobile app that the image now renders inline, and I did not run the rest of the test suite. The root cause comes from code reading and the payload posted in the issue.
Model and harness: Claude Sonnet 5.5 via Claude Code.