Skip to content

Windows Codex Desktop: Context compaction always fails with "stream closed before response.completed" #52016

Open

Description

@damaokuer

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 failed
  • stream closed before response.completed
  • timeout
  • Failed 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.toml to 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?

  1. Open Codex Desktop on Windows (version 26.1007.11041).
  2. Sign in directly using a ChatGPT account.
  3. Start a conversation using an official supported model.
  4. Continue the conversation until there is sufficient context to trigger compaction.
  5. Trigger manual context compaction, or continue until automatic compaction starts.
  6. Observe that compaction fails with stream closed before response.completed.
  7. Retry compaction. The same failure occurs repeatedly.
  8. 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

  1. added
    appIssues related to the Codex desktop app
    on Oct 8, 2026
  2. added
    bugSomething isn't working
    windows-osIssues related to Codex on Windows systems
    contextIssues related to context management (including compaction)
    connectivityIssues involving networking or endpoint connectivity problems (disconnections)
    on Oct 8, 2026
  3. github-actions commented on Oct 8, 2026

    @github-actions
    Contributor
  4. M-Mhappy commented on Oct 8, 2026

    @M-Mhappy

    +1 but both manual and automatic context compaction fail across all tested models. response protection is unavailable

  5. longdang193 commented on Oct 9, 2026

    @longdang193

    +1. Faced the same issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    appIssues related to the Codex desktop appbugSomething isn't workingconnectivityIssues involving networking or endpoint connectivity problems (disconnections)contextIssues related to context management (including compaction)windows-osIssues related to Codex on Windows systems

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions