Auto compact error

Resolved 💬 4 comments Opened Apr 24, 2026 by rcj1337 Closed Apr 26, 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?

.124

What subscription do you have?

pro

Which model were you using?

5.5

What platform is your computer?

windows

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

_No response_

What issue are you seeing?

I keep getting an auto compact error every time i get near the context window limits. even on sub agents.

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

codex_core::compact_remote: remote compaction failed turn_id=... last_api_response_total_tokens=239395 all_history_items_model_visible_bytes=1030065 estimated_tokens_of_items_added_since_last_successful_api_response=15190 estimated_bytes_of_items_added_since_last_successful_api_response=60758 model_context_window_tokens=Some(258400) failing_compaction_request_model_visible_bytes=1002450 compact_error=stream disconnected before completion: error sending request for url (https://chatgpt.com/backend-api/codex/responses/compact)

What steps can reproduce the bug?

Uploaded thread: 019dbd29-611e-7e63-a4ba-eeb24aa0e9b6

What is the expected behavior?

_No response_

Additional information

_No response_

View original on GitHub ↗

4 Comments

github-actions[bot] contributor · 4 months ago

Potential duplicates detected. Please review them and close your issue if it is a duplicate.

  • #18450
  • #18838
  • #17508
  • #18363

Powered by Codex Action

RossRichardson · 4 months ago

Error Message

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

Report ID:

019dbc87-4e2e-72c0-9b10-7124cb11dd38

Details

Mac Mini 4 24GB
Version: Version 26.422.21637 (2056)
Thread: 89% context window.
Model: 5.5 Fast XHigh

Reproducing:

  1. Update the application
  2. Notice the update button is still there.. update again :/
  3. go to thread which has a plan previous made but not dismissed or started
  4. message "start implementation"
  5. ~20-30 seconds until error message

What doesn't work

Close and open codex and retry

Fix/Workaround:

  1. Close the Application
  2. Restart the Mac
  3. Open up Codex, choose 5.5 at the welcome message
  4. ???
  5. Works
feelingsonice · 4 months ago

Seeing this exact issue. Restarted my Mac like @RossRichardson suggested and it worked?

thejhh · 3 months ago
Seeing this exact issue. Restarted my Mac like @RossRichardson suggested and it worked?

Probably "works" just because after a restart you'll have a fresh Codex session with empty history? If so, then full system restart is not neccessary to start a new session.

Or does this actually fix the issue when also restoring previous session after a full reboot?