automatic triggered "remote compact task" never works (Error running remote compact task: stream disconnected before completion)

Resolved 💬 5 comments Opened Apr 29, 2026 by Kupferfox Closed Jun 29, 2026

What version of Codex CLI is running?

codex-cli 0.125.0

What subscription do you have?

Pro

Which model were you using?

gpt-5.4, gpt-5.5

What platform is your computer?

Microsoft Windows NT 10.0.26200.0 x64

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

Powershell/CMD/VSCode (no difference)

What issue are you seeing?

On an automatic compact, the process fails. A manual "/compact" afterwards fails too. No chance to get the session running again.

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 direct internet connection is stable and has no influence on this behaviour.

A manual "/compact" before the context-window is reached _occasionally_ works.

What steps can reproduce the bug?

Fill session up till the context window limit is reached. The automatic compact-task and following manual /compact then fails.

What is the expected behavior?

That the compact works...

Additional information

_No response_

View original on GitHub ↗

This issue has 5 comments on GitHub. Read the full discussion on GitHub ↗