Context compaction failed

Resolved 💬 3 comments Opened Jun 1, 2026 by mdwarx Closed Jun 29, 2026

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

26.527.31326

What subscription do you have?

ChatGPT Plus

What platform is your computer?

Darwin 25.6.0 arm64 arm

What issue are you seeing?

While Codex was actively working on a task, the session attempted to automatically compact the context.

The compaction failed with the following error:

Error running remote compact task: stream disconnected before completion: error sending request for url (https://chatgpt.com/backend-api/codex/responses/compact)

The task appeared to stop unexpectedly during the compaction phase.

Feedback ID:
019e81ff-2ad4-7930-8224-47980fbdc561

The issue occurred after approximately 16 minutes of work while editing multiple files.

What steps can reproduce the bug?

Feedback ID: 019e811f-2ad4-7930-8224-47980fbdc561

  1. Start a Codex task that requires editing multiple files using 5.5 Extra High mode.
  2. Allow the task to run long enough for automatic context compaction to trigger.
  3. Observe the "Context automatically compacted" event.
  4. In some cases the compaction request fails.
  5. The following error appears:

Error running remote compact task: stream disconnected before completion: error sending request for url (https://chatgpt.com/backend-api/codex/responses/compact)

What is the expected behavior?

Automatic context compaction should complete successfully without interrupting the running task.

If compaction fails, Codex should retry automatically.

Additional information

The issue occurred during a long-running coding session involving multiple file edits.

At the time of failure:

  • 8 files had been edited.
  • Context compaction was triggered automatically.
  • The session reported "Worked for 16m 34s".
  • The error appeared immediately after the "Context automatically compacted" message.

No manual interruption was performed by the user.

View original on GitHub ↗

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