[codex] Fix Windows image_gen fallback for sprites#5
Draft
luyh7 wants to merge 1 commit into
Draft
Conversation
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.
Summary
save_imagegen_result.pyhelper that can persist Codeximage_generation_call.resultbase64 output as a local image file.$generate2dspriteraw-image handoff contract to avoid stalegenerated_imagesfiles and guessed/mnt/data/...paths.image_genrenders in chat but does not write a current PNG under the expected generated-images directory.Root Cause
This fixes #4. The bug only shows up on Windows/Codex Desktop sessions: the generated image is visible in the conversation, but no matching current file appears under
$CODEX_HOME/generated_imagesor~/.codex/generated_images. The sprite processor then receives no valid--inputPNG and stops before producingsheet-transparent.png, frame PNGs, or GIF output.The new contract falls back to the current Codex session JSONL /
image_generation_call.resultbase64 payload, decodes it into the run-localgenerated_images/folder, and then feeds that stable path into the existing processor.Validation
python3 -m py_compile skills/generate2dsprite/scripts/save_imagegen_result.pydata:image/...tool output plus animage_generation_call.result; helper decoded the latest image call into a PNG.python3 skills/generate2dsprite/scripts/generate2dsprite.py process --input <decoded_png> --target creature --mode idle ...producedsheet-transparent.png, four frame PNGs,animation.gif, andpipeline-meta.json.