codex - 💡(How to fix) Fix Compaction failure [2 comments, 3 participants]

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…
GitHub stats
openai/codex#20931Fetched 2026-05-05 05:56:07
View on GitHub
Comments
2
Participants
3
Timeline
7
Reactions
0
Author
Timeline (top)
labeled ×4commented ×2subscribed ×1

Error Message

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

RAW_BUFFERClick to expand / collapse

What version of Codex CLI is running?

0.128.0

What subscription do you have?

PRO

Which model were you using?

5.5 xhigh

What platform is your computer?

Linux 6.6.87.2-microsoft-standard-WSL2 x86_64 x86_64

What terminal emulator and version are you using (if applicable)?

VSCode

What issue are you seeing?

■ Error running remote compact task: stream disconnected before completion: error sending request for url (https://chatgpt.com/backend-api/codex/responses/compact) Compaction almost never works, leaves session hung and ends current conversations. When I keep telling it to proceed in order to restart compaction, sometimes it just resets with no context at all.

What steps can reproduce the bug?

Have codex compact the context.

What is the expected behavior?

Expected behavior is context compaction and session continuation

Additional information

No response

extent analysis

TL;DR

The issue may be resolved by checking the network connection and ensuring that the Codex CLI can establish a stable connection to the backend API.

Guidance

  • Verify that the network connection is stable and working correctly, as the error message indicates a disconnection issue.
  • Check the URL https://chatgpt.com/backend-api/codex/responses/compact to ensure it is accessible and responding correctly.
  • Try running the compaction task multiple times to see if the issue is intermittent or consistent.
  • Consider checking for any firewall or proxy settings that may be interfering with the connection to the backend API.

Notes

The issue may be related to network connectivity or server-side issues, and further investigation is needed to determine the root cause.

Recommendation

Apply workaround: Try running the compaction task multiple times or checking the network connection to see if the issue resolves itself, as the root cause is unclear.

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

codex - 💡(How to fix) Fix Compaction failure [2 comments, 3 participants]