Compaction failure
Resolved 💬 15 comments Opened May 4, 2026 by BottyBott 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?
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_
15 Comments
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
Can confirm sth similar:
Doesn't seem to go away until a new session is started.
just happened to me
■ Error running remote compact task: {
"error": {
"message": "Unknown parameter: 'safety_identifier'.",
"type": "invalid_request_error",
"param": "safety_identifier",
"code": "unknown_parameter"
}
}
0.128.0
just happened to me. It's not just CLIs, apps encounter the exact same issues.
Also seeing this on Codex Desktop for macOS.
Thread ID:
019e0390-d329-74c3-b8ab-13a32d339c9bCodex App:
26.429.61741 (2429)Error:
This is still happening today (2026-05-07).
@BottyBott Hey — I know this kind of issue too well. It is very close to the agent reliability problem I’m working on.
I’m building AgaveCore, and I’d like to let a few early people use it for free while I shape it into something stronger.
It helps when a coding agent starts to drift, loses important context, or gives you an output you do not fully trust.
In practice, it works through two habits:
remember-progressorremember-thiswhen something important should not be lostconsult-brainwhen the current task needs more grounded feedback on what to do nextOver time, as useful journals, decisions, and failures pile up, the product should help the agent make sharper decisions and take better actions with less drift.
If this sounds relevant, reply here and I’ll send the exact steps. You can also use the email or Telegram on my profile.
Cheers,
Mads.
still have that issue, quite annoying as it happens frequently
<img width="1097" height="422" alt="Image" src="https://github.com/user-attachments/assets/331f4bf3-f64d-42a8-841d-dce1a6577369" />
Here's a temporary workaround:
gpt-5.4-miniThe temporary workaround no longer works. I can no longer compact context in any of my open chats. My work cannot be continued until I am able to compact context again.
no-active-thread-019e4b81-5a50-7081-aac2-a85da3bb5f81
I encountered the same bug, and upgrading Codex to the latest version v0.133.0 didn't work either. This bug is critical! Please prioritize this issue!!
have the same problem
when is it going to be fixed? It is very annoying
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
/feedbackand open a new bug report.