Error running remote compact task

Resolved 💬 17 comments Opened Jan 24, 2026 by nshkrdotcom Closed Jun 29, 2026
💡 Likely answer: A maintainer (swordfish444, contributor) responded on this thread — see the highlighted reply below.

What version of Codex is running?

v0.89.0

What subscription do you have?

Pro

Which model were you using?

gpt-5.2-codex reasoning xhigh

What platform is your computer?

Ubuntu 24.04

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

_No response_

What issue are you seeing?

■ 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"
}
}

What steps can reproduce the bug?

Uploaded thread: 019becfa-bd48-7f63-882a-9a90d6052cb9

What is the expected behavior?

_No response_

Additional information

_No response_

View original on GitHub ↗

17 Comments

swordfish444 contributor · 5 months ago

@etraut-openai The uploaded thread ID here (019becfa-bd48-7f63-882a-9a90d6052cb9) should be really useful — thanks @nshkrdotcom.This feels like part of the broader “remote compaction can fail hard and strand the session” family (e.g. #9666 is a timeout waiting for the child process; there are a few other remote compact task reports too), just with a different failure mode (context_length_exceeded).

Two thoughts:

  • If the compaction step itself can hit context_length_exceeded, it likely means the compactor request is still too large (maybe including too much history/tool output). Server-side truncation/chunking of compactor input might help.
  • - UX-wise, if remote compaction fails, a fallback to local compaction (or at least a “continue without compaction” escape hatch) would prevent the user from getting stuck.

If you want to reduce fragmentation, maybe track these under a single canonical “remote compaction failures” issue and link the various thread IDs.

nshkrdotcom · 5 months ago

Hasnt happened since, and I have since updated codex.

atomical · 5 months ago

Still experiencing this issue. It may have to do with too much tool output in my case.

Vathivis · 5 months ago

started happening to me as well

id: 019c1eda-5393-7d70-a40c-a93a64ae17d8

Numinex-Corp · 5 months ago

Same for me. Having PRO plans. So for my case it happened 2 times and maybe seems related to plan mode. Because i was close to full context length and when using Plan mode it made the plan and didnt replay to launch the plan.

kcosr · 5 months ago

This has been happening to me for a few days. Previously I was a few versions of Codex behind, but I just upgraded and the problem continues.

019c2b9e-9310-7e43-af8f-ba6a031258db

brianbader · 4 months ago

This has been happening to me as well. I'm running codex on windows using ubuntu wsl.

019c9c8c-8d5e-7d20-96d6-06ddcabcb1d1

edit: the specific error I am seeing is below

■ Error running remote compact task: exceeded retry limit, last status: 429
Too Many Requests, request id: <some request id>
bitsydarel · 3 months ago

Error running remote compact task: {
"error": {
"message": "Unknown parameter: 'prompt_cache_retention'.",
"type": "invalid_request_error",
"param": "prompt_cache_retention",
"code": "unknown_parameter"
}
}

SebasGarcia08 · 3 months ago

This is happening to me very often now:

Error running remote compact task: {
"error": {
"message": "Unknown parameter: 'prompt_cache_retention'.",
"type": "invalid_request_error",
"param": "prompt_cache_retention",
"code": "unknown_parameter"
}
}

TheBatashev · 3 months ago

Error running remote compact task: { "error": { "message": "Unknown parameter: 'prompt_cache_retention'.", "type": "invalid_request_error", "param": "prompt_cache_retention", "code": "unknown_parameter" } }

HazelSX2 · 3 months ago

Latest version: very often at pro plan gpt-5.4 highx:
Error running remote compact task: {
"error": {
"message": "Unknown parameter: 'prompt_cache_retention'.",
"type": "invalid_request_error",
"param": "prompt_cache_retention",
"code": "unknown_parameter"
}
}

Running fine again after wait some minutes...

scottweiss · 3 months ago

gpt-5.4 xhigh

■ Error running remote compact task: {
"error": {
"message": "Unknown parameter: 'prompt_cache_retention'.",
"type": "invalid_request_error",
"param": "prompt_cache_retention",
"code": "unknown_parameter"
}
}

temktoznaet · 3 months ago

GPT 5.4

Error running remote compact task: { "error": { "message": "Unknown parameter: 'prompt_cache_retention'.", "type": "invalid_request_error", "param": "prompt_cache_retention", "code": "unknown_parameter" } }

YolozzZ66 · 3 months ago

I wait about 5 mins, and it return running normally.

etraut-openai contributor · 3 months ago

For those who were seeing the "prompt_cache_retention" error, that should be fixed now.

challmy · 1 month ago

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" } }
I am a 5x Pro package. Can anyone solve this problem for me?
019e4df6-f2ad-7bd3-a8b3-c0b65c4c4565
<img width="1874" height="848" alt="Image" src="https://github.com/user-attachments/assets/b768ac9c-11c2-4014-8545-c1fd6891fbc6" />

etraut-openai contributor · 21 days 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.