Skip to content

Keep running into "Error running remote compact task" #23050

Closed

Description

@tbvl

What version of Codex CLI is running?

0.130.0

What subscription do you have?

Pro plan 5x

Which model were you using?

gpt-5.5 xhigh

What platform is your computer?

Darwin 25.3.0 arm64 arm

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

iTerm2 + TMUX

Codex doctor report

not available

What issue are you seeing?

All day I have experienced longer running sessions ending mid session with "■ Error running remote compact task: stream disconnected before completion: error sending request for url (https://chatgpt.com/backend-api/codex/responses/compact)". Only remedy is to restart codex and start over, cant resume session.

What steps can reproduce the bug?

Uploaded thread: 019e30c3-ffd7-7e43-b945-47a5b2d73ea6

What is the expected behavior?

No response

Additional information

No response

Activity

  1. added
    bugSomething isn't working
    on May 16, 2026
  2. added
    CLIIssues related to the Codex CLI
    contextIssues related to context management (including compaction)
    connectivityIssues involving networking or endpoint connectivity problems (disconnections)
    on May 16, 2026
  3. snissn commented on May 16, 2026

    @snissn
  4. wifiuk commented on May 18, 2026

    @wifiuk
    Image

    i get this every single time it tries to do an automated compact, then it dies and nothing works, have to restart sessions fresh which is super frustrating.

  5. WolfgangSenff commented on May 19, 2026

    @WolfgangSenff

    I've been getting this every time as well. It happens also when I do /compact manually.

  6. Necmttn commented on Jun 21, 2026

    @Necmttn

    Compaction should be a resumable operation with its own attempt record.

    Before calling the remote compact endpoint, persist compact_attempt_id, source turn range, source hash, previous context pointer, and status started. If the stream disconnects, resume can either retry that attempt or keep using the pre-compact context, instead of leaving the whole session unrecoverable.

    That turns compact failure into a bounded state.


    Generated with ax.

  7. etraut-openai commented on Jun 29, 2026

    @etraut-openai
    Contributor

    Thanks for reporting this problem. Until recently, Codex used a separate endpoint and server-side logic for compaction. We recently switched to a more robust approach where the compaction logic is moved locally using the same endpoint as normal turns. This eliminates "remote compaction" errors and increases the stability and reliability of compaction operations. If you see further problems with compaction, please use /feedback and open a new bug report.

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

    CLIIssues related to the Codex CLIbugSomething 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