Skip to content

Error running remote compact task #9800

Closed

Description

@nshkrdotcom

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

Activity

  1. added
    contextIssues related to context management (including compaction)
    on Jan 24, 2026
  2. swordfish444 commented on Jan 26, 2026

    @swordfish444
    Contributor

    @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.
  3. nshkrdotcom commented on Jan 26, 2026

    @nshkrdotcom
    Author

    Hasnt happened since, and I have since updated codex.

  4. atomical commented on Jan 31, 2026

    @atomical

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

  5. Vathivis commented on Feb 3, 2026

    @Vathivis

    started happening to me as well

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

  6. Numinex-Corp commented on Feb 4, 2026

    @Numinex-Corp

    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.

  7. kcosr commented on Feb 5, 2026

    @kcosr

    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

  8. brianbader commented on Feb 27, 2026

    @brianbader

    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>
    
  9. bitsydarel commented on Apr 14, 2026

    @bitsydarel

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

  10. SebasGarcia08 commented on Apr 14, 2026

    @SebasGarcia08

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

  11. TheBatashev commented on Apr 14, 2026

    @TheBatashev

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

  12. HazelSX2 commented on Apr 14, 2026

    @HazelSX2

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

  13. scottweiss commented on Apr 14, 2026

    @scottweiss

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

  14. temktoznaet commented on Apr 14, 2026

    @temktoznaet

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

  15. YolozzZ66 commented on Apr 14, 2026

    @YolozzZ66

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

  16. etraut-openai commented on Apr 14, 2026

    @etraut-openai
    Contributor

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

  17. challmy commented on May 22, 2026

    @challmy

    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

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