mirror of
https://github.com/openai/codex.git
synced 2026-11-27 23:50:52 +00:00
## Why Pasting an image or an image file path could leave a temporary copy on disk even if the image never reached the app server. Drafts still need those copies during the session, and saved turns can reference them after exit. ## What changed Track pasted-image copies for the lifetime of the TUI session, including across backend switches and reconnects. Delete the remaining tracked copies on exit. Preserve copies when a turn is admitted or when a lost response leaves admission uncertain. Check model support before writing a clipboard image for an ordinary composer paste. In WSL, read PNG bytes from PowerShell's standard output so the fallback uses the same cleanup path. ## Testing Extend paste tests to verify that a copied image survives changes to the source file and a change of event sender, and that cleanup removes the copy while preserving the source. Verify that queueing a submission still leaves the copy eligible for cleanup. GitOrigin-RevId: 36d51af242901306be0ff319949d26a01ca71200