Attaching an image with large file size can nuke your thread and freeze the app.
What version of the Codex App are you using (From “About Codex” dialog)?
26.303.1606
What subscription do you have?
Plus
What platform is your computer?
Darwin 24.6.0 arm64 arm
What issue are you seeing?
Attaching a very large image (~134 MB PNG) to a prompt causes upload failure (unexpected status 413) and leaves the thread in a bad state. Selecting affected threads can hang the app, making prior context difficult to recover.
After several restarts of the app, finally got it to a state where I could create a new thread where investigating with the agent, it was able to confirm the attached 134MB image in the thread context data in ~/.codex/
The app is now stable while working on new threads, but as soon as I try to select the thread with large attached image, app hangs and sometimes I see network request errors - and I have to force-quit app.
Steps to Reproduce
- Open Codex desktop app.
- In an active thread, drag/drop a very large image file (~134 MB) as an attachment.
- Observe reconnect loop (
Reconnecting 1/5 ... 5/5) and thenunexpected status 413. - Try opening/selecting that thread again.
Expected Behavior
- App performs client-side file-size preflight validation before upload.
- If file exceeds limit, show a clear error with max allowed size.
- Offer safe fallback (e.g., auto-resize/compress or reject with guidance).
- Failed attachment should not corrupt or lock the thread.
- User should be able to remove failed attachment and continue.
Impact
- Potential loss of productive context in long-running threads.
- User confusion and repeated reconnect attempts.
- Reliability concern for workflows that involve image/PDF debugging.
Suggested Fixes
- Add client-side max-attachment-size check before upload.
- Show size limit in UI and in error message.
- Treat oversize upload as non-fatal per-thread state (no thread lock/hang).
- Provide "remove failed attachment" recovery action.
- Consider server returning structured limits so UI can display exact constraints.
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗