Skip to content

Context compaction not working #19441

Closed
Closed

Description

@misari21

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

26.422.30944 (2080)

What subscription do you have?

Pro x5

What platform is your computer?

Darwin 24.6.0 arm64 arm

What issue are you seeing?

Context is not being compacted, restarting does not help.
Context compression does not work either automatically or manually via the command. After that, the chat becomes completely unusable because of this issue.
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: 019dc08f-8377-7431-81c1-beb5e403867d

What is the expected behavior?

No response

Additional information

No response

Activity

  1. added
    appIssues related to the Codex desktop app
    on Apr 24, 2026
  2. added
    bugSomething isn't working
    contextIssues related to context management (including compaction)
    connectivityIssues involving networking or endpoint connectivity problems (disconnections)
    on Apr 24, 2026
  3. removed
    appIssues related to the Codex desktop app
    on Apr 24, 2026
  4. 6639835 commented on Apr 25, 2026

    @6639835

    Same.... No idea why they don't fix it.

  5. deksden commented on Apr 25, 2026

    @deksden

    Codex ran out of room in the model's context window. Start a new thread or clear earlier history before retrying.

    build 2080

  6. deksden commented on Apr 25, 2026

    @deksden

    Reverting to prev message did not work: session completely broken! Its very frustrating problem, please fix ASAP

  7. 6639835 commented on Apr 25, 2026

    @6639835

    Reverting to prev message did not work: session completely broken! Its very frustrating problem, please fix ASAP

    I suggest using gpt5.2

  8. presidenzo commented on May 7, 2026

    @presidenzo

    Also seeing this on Codex Desktop for macOS.

    Thread ID: 019e0390-d329-74c3-b8ab-13a32d339c9b
    Codex App: 26.429.61741 (2429)
    Error:

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

    This is still happening today (2026-05-07).

  9. mahdikayvan commented on May 8, 2026

    @mahdikayvan

    @misari21 Hey — your context compaction issue looked very close to the reliability problem I’m working on.

    I’m building AgaveCore and letting a few early CLI-heavy users try it free while I tighten it.

    It helps when a coding agent drifts, loses important progress, or gives you an output you do not fully trust.

    The loop is simple:

    • use remember-progress or remember-this to keep what matters
    • use consult-brain when the task needs grounded direction

    As useful journals, decisions, and failures build up, it should help the agent make sharper decisions with less drift over time.

    If this sounds relevant, reply here and I’ll send the exact steps. Email and Telegram are also on my profile.

    Cheers,
    Mads.

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