You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Codex “Copy as Markdown” embeds image attachments as huge base64 data URIs, causing paste targets to freeze #22894
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/...;base64 content.
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.
Activity