codex icon indicating copy to clipboard operation
codex copied to clipboard

Error running remote compact task

Open nshkrdotcom opened this issue 10 months ago • 17 comments

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

nshkrdotcom avatar Jan 24 '26 01:01 nshkrdotcom

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

swordfish444 avatar Jan 26 '26 06:01 swordfish444

Hasnt happened since, and I have since updated codex.

nshkrdotcom avatar Jan 26 '26 06:01 nshkrdotcom

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

atomical avatar Jan 31 '26 16:01 atomical

started happening to me as well

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

Vathivis avatar Feb 03 '26 13:02 Vathivis

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.

Numinex-Corp avatar Feb 04 '26 19:02 Numinex-Corp

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

kcosr avatar Feb 05 '26 04:02 kcosr

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>

brianbader avatar Feb 27 '26 02:02 brianbader

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

bitsydarel avatar Apr 14 '26 17:04 bitsydarel

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

SebasGarcia08 avatar Apr 14 '26 17:04 SebasGarcia08

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

TheBatashev avatar Apr 14 '26 17:04 TheBatashev

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

HazelSX2 avatar Apr 14 '26 17:04 HazelSX2

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

scottweiss avatar Apr 14 '26 17:04 scottweiss

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

temktoznaet avatar Apr 14 '26 17:04 temktoznaet

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

YolozzZ66 avatar Apr 14 '26 17:04 YolozzZ66

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

etraut-openai avatar Apr 14 '26 18:04 etraut-openai

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 Image

challmy avatar May 22 '26 04:05 challmy

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.

etraut-openai avatar Jun 29 '26 17:06 etraut-openai