Skip to content

Auto compact error #19255

Closed
Closed

Description

@rcj1337

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

Activity

  1. added
    CLIIssues related to the Codex CLI
    contextIssues related to context management (including compaction)
    connectivityIssues involving networking or endpoint connectivity problems (disconnections)
    on Apr 24, 2026
  2. RossRichardson commented on Apr 24, 2026

    @RossRichardson

    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
  3. feelingsonice commented on Apr 24, 2026

    @feelingsonice

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

  4. thejhh commented on May 1, 2026

    @thejhh

    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?

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

    bugSomething isn't workingconnectivityIssues involving networking or endpoint connectivity problems (disconnections)contextIssues related to context management (including compaction)

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions