Skip to content

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

Closed

Description

@xi203040

What version of Codex CLI is running?

codex-cli 0.112.0

What subscription do you have?

team

Which model were you using?

gpt-5.4 xhigh

What platform is your computer?

Linux 5.15.0-78-generic x86_64 x86_64

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

Terminal

What issue are you seeing?

Error running remote compact task: 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: 019cd09e-b9f2-7313-b289-259a2be574f8

When the Context window is insufficient, automatic compression is performed.

What is the expected behavior?

The expected outcome is successful automatic compression, not an error message.

Additional information

No response

Activity

  1. DanilAtyukov-dev commented on Mar 13, 2026

    @DanilAtyukov-dev

    same problem, thread ID 019cdcf1-59d7-7611-b1f9-abdf08a02deb

  2. Grallen commented on Mar 16, 2026

    @Grallen

    This it probably related to the too short timeout fix I just submitted #14860

  3. added
    contextIssues related to context management (including compaction)
    on Mar 23, 2026
  4. slurrr commented on Apr 1, 2026

    @slurrr

    me too
    019d4ab1-0351-71a0-ba05-ec95238f5cb6

  5. jonasrisbrandt commented on Apr 10, 2026

    @jonasrisbrandt

    Same. 019d73db-6765-7791-ab1e-94c90192b7d6

  6. RobotKSR commented on Apr 19, 2026

    @RobotKSR

    What I paid subscription for?

    Image
  7. Grallen commented on Apr 20, 2026

    @Grallen

    In ~/.codex/config.toml
    Put stream_idle_timeout_ms = 300000
    It puts a three minutes timeout on it. If you are on Linux it's currently 30 seconds. The 150 seconds it seems to take is only because it retries 5 times.

  8. 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

    bugSomething isn't workingcontextIssues 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