Windows Codex app: large pasted text fails to attach with "Large pasted text could not be attached"
What happened?
When pasting large text into a Codex desktop session on Windows, the paste fails with this visible error:
Large pasted text could not be attached
This reportedly started happening in the last few days after previously working. The paste does not appear to be added to the session as text or as an attachment, so the user cannot provide large context through the composer.
Expected behavior
Large pasted text should either:
- paste into the composer, or
- be converted into an attached text artifact that is successfully available to the session.
Actual behavior
Codex shows the error above and the pasted content is not attached.
Reproduction steps
- Open Codex desktop app on Windows.
- Start or continue a Codex session.
- Copy a large text block from another application.
- Paste it into the Codex composer.
- Observe the failure toast:
Large pasted text could not be attached.
Environment
- OS: Windows 10 Pro 10.0.19045, x64, en-US
- Codex desktop app package observed on disk:
OpenAI.Codex_26.609.4994.0_x64__2p2nqsd0c76g0 - Codex CLI:
0.139.0 - CLI install method: npm
- Auth mode: ChatGPT
- Network: no proxy env vars;
codex doctorreports ChatGPT reachability and websocket handshake OK
Related local diagnostics
codex doctor --json status: warning, with no failed checks. Notable warnings:
- MCP configuration has optional issues
- update probe returned HTTP 504 while checking latest version
- thread inventory warning: rollout files and state DB thread inventory differ; some state DB rows point at missing or unusable rollout files
Local Codex app logs around the same period contain repeated paste-related warnings, for example:
Failed to load pasted text excerpts for title generation ... errorMessage="The system cannot find the path specified. (os error 3)"
Observed on June 11, June 12, and June 13, 2026. Raw logs were not attached here because they may contain sensitive local paths, conversation IDs, or prompt content.
Workaround
Saving the large text into a local .txt / .md file and asking Codex to read the file by absolute path appears to bypass the paste-to-attachment path.
6 Comments
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
I can confirm this. I always have to put it into a .txt file first and then drag it in.
Version 26.609.41114 • Released 12.06.2026 / Windows 11 Pro
I found a local workaround that fixed this on Windows.
The large-paste path appears to use a managed pasted-text attachment registry under:
On the affected machine, the whole
.codex\attachmentsdirectory was missing. Creating the directory and initializing the registry file fixed large text paste after restarting Codex:Then fully quit and reopen the Codex app.
This may point to first-run / missing-directory handling in the pasted-text attachment flow. The app logs showed
fs/readFilefailing withos error 3while trying to load pasted text attachment state.That worked great!
Works for me as well 26.609.71450 version and also here's the one liner
New-Item -ItemType Directory -Force "$env:USERPROFILE\.codex\attachments"; '{"attachmentPaths":[],"pendingRemovalPaths":[],"textExcerptsByPath":{}}' | Set-Content -NoNewline -Encoding UTF8 "$env:USERPROFILE\.codex\attachments\pasted-text-attachments.json"@zzccchen, @santhoshkumar-dev,
Thanks a lot for the workaround.
Now, when I paste ~6000 character long text, it gets attached as a file. Is it intended?