Codex “Copy as Markdown” embeds image attachments as huge base64 data URIs, causing paste targets to freeze
Feedback ID: 019e2a64-5cde-7610-a413-c4082d2f246a
I ran into an issue with Copy as Markdown in the Codex desktop app. When the current Codex session contains image attachments or screenshots, using the top-left chat menu → Copy as Markdown copies the images as inline data:image/png;base64,... blocks inside the Markdown output.
This makes the copied Markdown extremely large and unsafe/unusable to paste into other apps.
Environment
- App: Codex desktop app
- Version:
26.513.20950 (2816) - OS: macOS Tahoe
26.4.1 - Device: MacBook Pro 16-inch, Apple M5 Max, 128 GB memory
Steps to reproduce
- Open the Codex desktop app.
- Open a Codex session that contains image attachments/screenshots.
- Click the top-left chat menu.
- Select
Copy as Markdown. - Paste the copied content into a ChatGPT text box or Microsoft Word.
Actual behavior
- The Markdown output contains very large inline
data:image/png;base64,...image strings. - Pasting into the ChatGPT input box becomes extremely slow or effectively unusable.
- Pasting into Microsoft Word creates a huge document and caused Word to become not responding, requiring Force Quit.
- This makes the Markdown copy workflow nearly unusable for issue reporting, context transfer, and documentation.
Expected behavior
Copy as Markdown should not embed image attachments as inline base64 data URIs by default. A safer behavior would be to:
- use compact placeholders such as
[Image attachment: screenshot.png]; - use attachment references, filenames, or local file references;
- copy text only by default;
- or at minimum apply a size limit and replace large data URIs with placeholders.
Suggested fix
- Do not inline base64 images by default in
Copy as Markdown. - Add a max-size guard for
data:image/...;base64content. - Provide separate export/copy modes, for example:
- Copy text only
- Copy with attachment placeholders
- Copy with inline images
- Apply the same sanitization to user messages, Codex responses, and included session logs so no image path can bypass the limit.
This is not only a formatting issue. It can freeze external apps and break the workflow for reporting Codex issues or moving session context elsewhere.
<img width="2048" height="877" alt="Image" src="https://github.com/user-attachments/assets/d55d4bd4-46bd-43cf-9fa3-24a386c000c4" />
<img width="2048" height="1712" alt="Image" src="https://github.com/user-attachments/assets/3c90a482-fe7d-488c-8b92-121eff08a595" />
<img width="2048" height="487" alt="Image" src="https://github.com/user-attachments/assets/3312d349-343a-4cc2-afe9-60977d2f0d32" />