Skip to content

Regression: long resumed conversations fail remote compact with context_length_exceeded on 0.132.0+ #24002

Closed

Description

@zhatlas

What version of Codex CLI is running?

Observed with:

  • codex-cli 0.132.0
  • codex-cli 0.133.0

Downgrading to codex-cli 0.131.0 works around the problem.

Which model were you using?

GPT-5.5 in Codex.

What platform is your computer?

Linux / WSL environment.

What issue are you seeing?

A very long conversation can no longer continue after upgrading to 0.132.0 or 0.133.0. When the conversation is resumed, Codex appears to put the full conversation history back into the model context instead of successfully compacting it. The remote compact task then fails with context_length_exceeded, and the session cannot continue.

Error shown by Codex:

Error running remote compact task: {
  "error": {
    "message": "Your input exceeds the context window of this model. Please adjust your input and try again.",
    "type": "invalid_request_error",
    "param": "input",
    "code": "context_length_exceeded"
  }
}

This looks like a regression in the resume / remote compaction path. The same long conversation can be continued again after downgrading to 0.131.0.

What steps can reproduce the bug?

  1. Start with a very long Codex conversation.
  2. Use Codex CLI 0.132.0 or 0.133.0.
  3. Resume the long conversation.
  4. Continue the conversation until Codex tries to compact remotely.
  5. Observe that remote compact fails with context_length_exceeded, and the conversation cannot continue.
  6. Downgrade to 0.131.0 and resume the same workflow. The conversation can continue again.

What is the expected behavior?

Resume should not re-add the entire long conversation to the active context in a way that makes compaction impossible. Codex should compact or trim the resumed conversation before sending it to the model, so long conversations remain recoverable.

Additional information

This may be related to #23694, which also reports a remote compact regression after upgrading to 0.132.0, but that issue reports array_above_max_length. This report is specifically for the context_length_exceeded failure mode on resumed long conversations.

Activity

  1. added
    bugSomething isn't working
    CLIIssues related to the Codex CLI
    contextIssues related to context management (including compaction)
    sessionIssues involving session (thread) management, resuming, forking, naming, archiving
    on May 22, 2026
  2. selaquik commented on May 23, 2026

    @selaquik

    Same problem. And the app can’t be rolled back to an earlier version either.

  3. zzzjasdawd commented on May 24, 2026

    @zzzjasdawd

    How to downgrade the codex Windows application

  4. cwolff-oai commented on May 24, 2026

    @cwolff-oai

    We can reproduce this on 0.132.0/0.133.0. The current workaround is to stay on 0.131.0 for the CLI; we are still investigating the resume/remote compact regression.

  5. 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 workingcontextIssues related to context management (including compaction)sessionIssues involving session (thread) management, resuming, forking, naming, archiving

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions