codex - 💡(How to fix) Fix Codex App compact fails on PDF-heavy thread

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Error Message

Error message: Error running remote compact task: stream disconnected before completion: error sending request for url (https://chatgpt.com/backend-api/codex/responses/compact) Error running remote compact task: stream disconnected before completion: error sending request for url (https://chatgpt.com/backend-api/codex/responses/compact)

Root Cause

This does not appear to be a general network/proxy issue, because other Codex/ChatGPT conversations were still working at the same time. My suspicion is that the compact task is trying to include or process too much PDF-derived content from the thread.

RAW_BUFFERClick to expand / collapse

What version of the Codex App are you using (From “About Codex” dialog)?

26.506.3741.0

What subscription do you have?

plus

What platform is your computer?

Microsoft Windows NT 10.0.19045.0 x64

What issue are you seeing?

Codex App context compaction failed in a PDF-heavy literature extraction thread.

Error message: Error running remote compact task: stream disconnected before completion: error sending request for url (https://chatgpt.com/backend-api/codex/responses/compact)

The affected thread was used for literature information extraction and contained many uploaded PDF files. In this workflow, the PDFs are transient inputs for individual extraction tasks. The important long-term context is the extraction format and conversation protocol that I had established with Codex.

After the compact failure, the affected thread became effectively unusable and could no longer respond normally. Other Codex/ChatGPT conversations continued working at the same time, so this does not appear to be a general connectivity or proxy issue.

What steps can reproduce the bug?

I am using Codex App for a literature extraction workflow. The affected thread contains many uploaded PDF files. The important long-term context in this thread is not the PDF contents themselves, but the extraction format / conversation protocol that I had already established with Codex.

When the thread attempted to compact context, it failed with:

Error running remote compact task: stream disconnected before completion: error sending request for url (https://chatgpt.com/backend-api/codex/responses/compact)

After this happened, the affected Codex window/thread became effectively unusable and could no longer respond normally.

This does not appear to be a general network/proxy issue, because other Codex/ChatGPT conversations were still working at the same time. My suspicion is that the compact task is trying to include or process too much PDF-derived content from the thread.

Expected behavior: Codex should be able to compact the thread without failing, or it should provide a way to recover. For document-processing workflows, uploaded PDFs should be treated as transient task inputs unless explicitly pinned or marked for retention. The compacted context should prioritize user-defined workflow instructions, output format, field definitions, and conversation protocol over large attachment-derived content.

Feature request / suggestion: Please consider allowing users to influence context compaction, for example:

  • mark certain messages/instructions as "keep"
  • mark uploaded files or file-derived content as "transient / exclude from compact"
  • preview or edit the compacted summary before applying it
  • preserve conversation-level workflow instructions separately from large document attachments

What is the expected behavior?

The thread should remain usable after context compaction.

For PDF-heavy document-processing workflows, Codex should prioritize preserving the user-defined workflow instructions, extraction format, field definitions, and conversation protocol, rather than attempting to retain or process all uploaded PDF-derived content.

Uploaded PDFs should be treated as transient task inputs by default unless the user explicitly pins or marks them for retention. If compaction cannot complete, Codex should provide a recoverable failure state, such as retrying with attachment-derived content excluded, letting the user edit/preview the compacted context, or allowing the user to continue from the preserved workflow instructions.

Additional information

No response

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING