Context compaction fails with unknown parameter 'prompt_cache_retention'

2 min read Original article ↗

What version of the Codex App are you using (From “About Codex” dialog)?

26.409.20454 (1462)

What subscription do you have?

ChatGPT Pro

What platform is your computer?

Darwin 25.2.0 arm64 arm

What issue are you seeing?

While using the Codex Mac app, automatic context compaction fails instead of compacting the thread.

The app shows this error inline in the chat UI:

Image

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

This appears during the "Automatically compacting context" step. Instead of compacting the conversation, the app surfaces the raw API error.

What steps can reproduce the bug?

  1. Open the Codex macOS app.
  2. Work in a thread until the app attempts automatic context compaction.
  3. Wait for the "Automatically compacting context" message to appear.
  4. Observe that the compact task fails with:
   Error running remote compact task: { "error": { "message": "Unknown parameter: 'prompt_cache_retention'.", "type": "invalid_request_error", "param": "prompt_cache_retention", "code": "unknown_parameter" } }

What is the expected behavior?

Automatic context compaction should complete successfully and continue the conversation normally.

Additional information

Running /compact manually on the same thread from the CLI results in this:

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