Context compaction not working

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

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

26.422.30944 (2080)

What subscription do you have?

Pro x5

What platform is your computer?

Darwin 24.6.0 arm64 arm

What issue are you seeing?

Context is not being compacted, restarting does not help.
Context compression does not work either automatically or manually via the command. After that, the chat becomes completely unusable because of this 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: 019dc08f-8377-7431-81c1-beb5e403867d

What is the expected behavior?

_No response_

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.

  • #19329
  • #19255
  • #18450
  • #18838
  • #19390

Powered by Codex Action

6639835 · 2 months ago

Same.... No idea why they don't fix it.

deksden · 2 months ago

Codex ran out of room in the model's context window. Start a new thread or clear earlier history before retrying.

build 2080

deksden · 2 months ago

Reverting to prev message did not work: session completely broken! Its very frustrating problem, please fix ASAP

6639835 · 2 months ago
Reverting to prev message did not work: session completely broken! Its very frustrating problem, please fix ASAP

I suggest using gpt5.2

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

mahdikayvan · 2 months ago

@misari21 Hey — your context compaction issue looked very close to the reliability problem I’m working on.

I’m building AgaveCore and letting a few early CLI-heavy users try it free while I tighten it.

It helps when a coding agent drifts, loses important progress, or gives you an output you do not fully trust.

The loop is simple:

  • use remember-progress or remember-this to keep what matters
  • use consult-brain when the task needs grounded direction

As useful journals, decisions, and failures build up, it should help the agent make sharper decisions with less drift over time.

If this sounds relevant, reply here and I’ll send the exact steps. Email and Telegram are also on my profile.

Cheers,
Mads.

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.