Custom harness getting random prompt_cache_retention errors

I just started getting spurious 400 errors with

{
  "error": {
    "message": "prompt_cache_retention is not supported on this model",
    "type": "invalid_request_error",
    "param": "prompt_cache_retention",
    "code": "invalid_parameter"
  }
}

I am not sending this parameter up, can not find it in my repo, it is somehow being injected in my session and then killing the agentic loop.

Has anyone seen anything like this?

I saw something similar here:

My harness has been working flawlessly with very good cache hits, but now it is hitting this error consistently enough that I will add it into a retry list.

I did this for now, but it does not feel right: auto recover from prompt cache retention errors · SamSaffron/term-llm@26b1633 · GitHub

Hi Sam,

Yes, the following is a standard reply I use, but it is still an effective one.

You are welcome to discuss Codex issues here. However, the official place to report and track them is the OpenAI Codex GitHub issue tracker.

I asked ChatGPT to look for the closest related issue, and it identified:

At the time of writing, the issue is about four hours old and already has roughly 20 “me too”-style replies.

If that issue matches your problem, consider adding a :+1: reaction on the GitHub issue itself—not only on this forum topic. Reactions on GitHub can help the developers gauge the number of affected users.

If it does not describe the same problem, search the existing Codex issues for a closer match. If you cannot find one, open a new issue and include as much relevant detail as possible.

The team has addressed this issue and rolled out a fix.
If you are still encountering this please follow-up here or create a new topic.

Thank you for raising it