The context window is too small --- Auto Compact on Terminal is completely broken

Resolved 💬 8 comments Opened Apr 29, 2026 by shm000111 Closed Jun 29, 2026
💡 Likely answer: A maintainer (github-actions[bot], contributor) responded on this thread — see the highlighted reply below.

What version of Codex CLI is running?

OpenAI Codex (v0.125.0)

What subscription do you have?

Pro ($100)

Which model were you using?

gpt-5.5

What platform is your computer?

_No response_

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

_No response_

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)

■ 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)

■ Conversation interrupted - tell the model what to do differently. Something went wrong? Hit /feedback to report the issue.

■ Conversation interrupted - tell the model what to do differently. Something went wrong? Hit /feedback to report the issue.

■ Conversation interrupted - tell the model what to do differently. Something went wrong? Hit /feedback to report the issue.

■ Conversation interrupted - tell the model what to do differently. Something went wrong? Hit /feedback to report the issue.

■ Conversation interrupted - tell the model what to do differently. Something went wrong? Hit /feedback to report the issue.

■ Conversation interrupted - tell the model what to do differently. Something went wrong? Hit /feedback to report the issue.

■ Conversation interrupted - tell the model what to do differently. Something went wrong? Hit /feedback to report the issue.

■ Conversation interrupted - tell the model what to do differently. Something went wrong? Hit /feedback to report the issue.

■ Conversation interrupted - tell the model what to do differently. Something went wrong? Hit /feedback to report the issue.

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

■ Conversation interrupted - tell the model what to do differently. Something went wrong? Hit /feedback to report the issue.

■ Conversation interrupted - tell the model what to do differently. Something went wrong? Hit /feedback to report the issue.

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

■ Conversation interrupted - tell the model what to do differently. Something went wrong? Hit /feedback to report the issue.

■ Error running remote compact task: stream disconnected before completion: error sending request for url (https://chatgpt.com/backend-api/codex/responses/compact)
■ Conversation interrupted - tell the model what to do differently. Something went wrong? Hit /feedback to report the issue.

■ Conversation interrupted - tell the model what to do differently. Something went wrong? Hit /feedback to report the issue.

■ Conversation interrupted - tell the model what to do differently. Something went wrong? Hit /feedback to report the issue.

■ Conversation interrupted - tell the model what to do differently. Something went wrong? Hit /feedback to report the issue.

■ Conversation interrupted - tell the model what to do differently. Something went wrong? Hit /feedback to report the issue.

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

■ Conversation interrupted - tell the model what to do differently. Something went wrong? Hit /feedback to report the issue.

■ Conversation interrupted - tell the model what to do differently. Something went wrong? Hit /feedback to report the issue.

■ Conversation interrupted - tell the model what to do differently. Something went wrong? Hit /feedback to report the issue.

■ Conversation interrupted - tell the model what to do differently. Something went wrong? Hit /feedback to report the issue.

• Feedback uploaded. Please open an issue using the following URL:

https://github.com/openai/codex/issues/new?template=3-cli.yml&steps=Uploaded%20thread:%20019d7c15-4ba8-7231-bc1c-7513d08cfdee

Or mention your thread ID 019d7c15-4ba8-7231-bc1c-7513d08cfdee in an existing issue.

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

What steps can reproduce the bug?

Uploaded thread: 019d7c15-4ba8-7231-bc1c-7513d08cfdee

What is the expected behavior?

Auto compact is completely broken. Claude had this issue months ago and Codex is way behind on this fix. Model is good but if im unable to use it then I will move back to Claude.

Additional information

_No response_

View original on GitHub ↗

8 Comments

github-actions[bot] contributor · 2 months ago

Potential duplicates detected. Please review them and close your issue if it is a duplicate.

  • #20160
  • #19740
  • #19547
  • #19441
  • #18838

Powered by Codex Action

shm000111 · 2 months ago

I have faced this issue several times in 2 days. It is wasting a lot of my coding time. Please close the duplicates when you find and resolve the issue. Thanks

shm000111 · 2 months ago

Not sure if someone at OpenAI fixed it. Maybe the issue was due to a broken/inconsistent npm-global Codex install, which I have been using for several days; it was working fine until yesterday. After switching to the Homebrew install, the context is compacted now. I will close it when I have tested for a few more hours. @etraut-openai

nilswx · 2 months ago

Which codex --version were you using, @shm000111? The compaction hang just happened for me in codex-cli 0.126.0-alpha.16 and the latest macOS desktop app (which uses codex-cli 0.126.0-alpha.8), but only with gpt-5.5 and gpt-5.4. Switching to gpt-5.3-codex always works for me. It seems model/capacity related, not harness.

shm000111 · 2 months ago
Which codex --version were you using, @shm000111? The compaction hang just happened for me in codex-cli 0.126.0-alpha.16 and the latest macOS desktop app (which uses codex-cli 0.126.0-alpha.8), but only with gpt-5.5 and gpt-5.4. Switching to gpt-5.3-codex always works for me. It seems model/capacity related, not harness.

I was on cli 0.125.0 (It did start happening while I was on 5.5)
I tested across models: gpt-5.5, 5.4, 5.3-codex, 5.2, medium/low variants, and the issue persisted in all cases.
In my case, it wasn’t model-related; it was the install.
After removing the npm-global version and reinstalling via Homebrew, the compaction errors stopped.
So this might be a mix of factors, but for me it was definitely the CLI environment, not the model.

presidenzo · 2 months ago

Also seeing this on Codex Desktop for macOS.

Thread ID: 019e0390-d329-74c3-b8ab-13a32d339c9b
Codex App: 26.429.61741 (2429)
Error:

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

This is still happening today (2026-05-07).

shm000111 · 2 months ago

It was never fixed
Thread: 019d7c15-4ba8-7231-bc1c-7513d08cfdee

etraut-openai contributor · 21 days ago

Thanks for reporting this problem. Until recently, Codex used a separate endpoint and server-side logic for compaction. We recently switched to a more robust approach where the compaction logic is moved locally using the same endpoint as normal turns. This eliminates "remote compaction" errors and increases the stability and reliability of compaction operations. If you see further problems with compaction, please use /feedback and open a new bug report.