codex - 💡(How to fix) Fix Unknown parameter: 'prompt_cache_retention'. [5 comments, 6 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openai/codex#17813Fetched 2026-04-15 06:27:45
View on GitHub
Comments
5
Participants
6
Timeline
14
Reactions
7
Author
Timeline (top)
commented ×5cross-referenced ×4labeled ×3closed ×1

Error Message

After a long continuous session I started getting this error as a response to every prompt: ■ Error running remote compact task: { "error": {

Code Example

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

What version of Codex CLI is running?

codex-cli 0.120.0

What subscription do you have?

Pro 200$

Which model were you using?

gpt-5.4 high

What platform is your computer?

Linux 5.15.0-139-generic x86_64 x86_64

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

Gnome terminal + Tmux

What issue are you seeing?

After a long continuous session I started getting this error as a response to every prompt:

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

Restarting codex does not help.

What steps can reproduce the bug?

Uploaded thread: 019d77ac-c213-7df3-899b-46d23518fc1d

What is the expected behavior?

No response

Additional information

No response

extent analysis

TL;DR

The error "Unknown parameter: 'prompt_cache_retention'" suggests a potential mismatch between the Codex CLI version and the API or configuration, which may be resolved by checking the documentation for the correct parameter name or updating the configuration.

Guidance

  • Verify the prompt_cache_retention parameter is correctly documented and supported in the version of the Codex CLI being used (0.120.0).
  • Check the API documentation for any recent changes to parameter names or deprecations that might affect the current setup.
  • Review the configuration files or environment variables used by the Codex CLI to ensure they match the expected format and parameters for the gpt-5.4 high model.
  • Consider reaching out to support or checking community forums for similar issues related to the prompt_cache_retention parameter and the Codex CLI version.

Notes

The issue seems to be related to a specific parameter (prompt_cache_retention) that is not recognized, which could indicate a version mismatch or a configuration issue. Without more information about the configuration or recent changes to the API, it's challenging to provide a definitive fix.

Recommendation

Apply workaround: Given the error message and the fact that restarting the Codex CLI does not resolve the issue, it might be necessary to adjust the configuration or the way the prompt_cache_retention parameter is used, possibly by removing or renaming it if it's not essential for the current workflow.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

codex - 💡(How to fix) Fix Unknown parameter: 'prompt_cache_retention'. [5 comments, 6 participants]