Error running remote compact task: Context Length Exceeded

Resolved 💬 2 comments Opened May 22, 2026 by megaacheyounes Closed Jun 29, 2026
💡 Likely answer: A maintainer (github-actions[bot], contributor) responded on this thread — see the highlighted reply below.

What version of Codex CLI is running?

0.133.0

What subscription do you have?

Plus

Which model were you using?

gpt-5.5 medium

What platform is your computer?

Microsoft Windows NT 10.0.22631.0 x64

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

PowerShell 7.6.0

Codex doctor report

What issue are you seeing?

When attempting to run /compact command or writing a prompt, the CLI is always throwing context_length_exceeded error.

This started happening only after updating to version v0.133.0 .

<img width="1597" height="894" alt="Image" src="https://github.com/user-attachments/assets/d155b926-3d7f-4ce4-a9a4-6cac7da89211" />

What steps can reproduce the bug?

1- install Codex v0.133.0
2- cd to a project directory, then start the Codex CLI using command codex --yolo
3- run /resume and choose an existing session
4- run /compact or write any prompt
5- Cli throws error with code context_length_exceeded

What is the expected behavior?

_No response_

Additional information

_No response_

View original on GitHub ↗

2 Comments

github-actions[bot] contributor · 3 months ago

Potential duplicates detected. Please review them and close your issue if it is a duplicate.

  • #24002
  • #24014
  • #23589

Powered by Codex Action

etraut-openai contributor · 1 month ago

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.