Repository navigation
Windows Codex Desktop: Context compaction always fails with "stream closed before response.completed" #52016
Description
What version of the Codex App are you using (From “About Codex” dialog)?
26.1007.11041
What subscription do you have?
ChatGPT Plus
What platform is your computer?
Get-CimInstance Win32_OperatingSystem | Select-Object Caption, Version, OSArchitecture
What issue are you seeing?
Description
Context compaction consistently fails in Codex Desktop for Windows (version 26.1007.11041).
Normal conversations and model responses work correctly, but both manual and automatic context compaction fail across all tested models.
The issue affects multiple existing long conversations as well as newly created conversations. Retrying does not resolve the problem.
Error messages
Error running remote compact task:
stream disconnected before completion:
stream closed before response.completed
Another error observed:
stream disconnected before completion:
response protection is unavailable
Diagnostic findings
I inspected the local Codex SQLite logs (~/.codex/logs_2.sqlite). The logs repeatedly show:
remote compaction v2 stream failedstream closed before response.completedtimeoutFailed to run pre-sampling compact
The failures are recorded by codex_core::responses_retry and codex_core::session::turn.
No definitive HTTP error status was identified in the compaction logs.
Troubleshooting already performed
- Tested multiple models and reasoning effort settings.
- Tested manual and automatic compaction.
- Tested existing conversations and newly created conversations.
- Signed directly into the official Codex Desktop application using my ChatGPT account.
- Temporarily cleared
config.tomlto test the default configuration. - Confirmed that normal conversations continue to work.
- Previously tested a third-party API relay, but the compaction failure also persists with direct ChatGPT login and a clean configuration.
- Network environment uses Clash Verge Rev with a Windows system proxy. TUN mode is disabled.
Expected behavior
Context compaction should complete successfully, allowing long conversations to continue.
Actual behavior
The remote compaction task repeatedly times out or terminates before receiving response.completed. Long-running tasks become difficult or impossible to continue.
Please investigate the remote compaction V2 request handling, response streaming, and possible Windows Codex Desktop compatibility issues.
What steps can reproduce the bug?
- Open Codex Desktop on Windows (version 26.1007.11041).
- Sign in directly using a ChatGPT account.
- Start a conversation using an official supported model.
- Continue the conversation until there is sufficient context to trigger compaction.
- Trigger manual context compaction, or continue until automatic compaction starts.
- Observe that compaction fails with
stream closed before response.completed. - Retry compaction. The same failure occurs repeatedly.
- Repeat with another model or conversation. The issue persists.
Reproduction frequency: 100% in my tested sessions.
Additional observation: Normal model responses work correctly. Only context compaction consistently fails.
What is the expected behavior?
No response
Additional information
No response
Activity
github-actions commentedon Oct 8, 2026
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
M-Mhappy commentedon Oct 8, 2026
+1 but both manual and automatic context compaction fail across all tested models. response protection is unavailable
longdang193 commentedon Oct 9, 2026
+1. Faced the same issue