codex - 💡(How to fix) Fix Compaction fails with - Unknown parameter: 'prompt_cache_retention'. [2 comments, 3 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#17816Fetched 2026-04-15 06:27:40
View on GitHub
Comments
2
Participants
3
Timeline
6
Reactions
0
Timeline (top)
labeled ×3commented ×2closed ×1

Error Message

■ Error running remote compact task: { "error": {

RAW_BUFFERClick to expand / collapse

What version of Codex CLI is running?

0.120.0

What subscription do you have?

ChatGPT Pro

Which model were you using?

GPT-5.4

What platform is your computer?

Linux 5.15.158-2-pve x86_64 unknown

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

Terminal.app

What issue are you seeing?

When I try /compact or it auto-compacts it fails with this:

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

What steps can reproduce the bug?

/compact

What is the expected behavior?

IT compacts

Additional information

No response

extent analysis

TL;DR

The issue is likely due to an incompatible parameter 'prompt_cache_retention' being passed during the compact operation, and removing or updating this parameter may resolve the issue.

Guidance

  • Verify the Codex CLI configuration and documentation to check if the 'prompt_cache_retention' parameter is supported in version 0.120.0.
  • Check the GPT-5.4 model documentation to see if it has any specific requirements or limitations for compact operations.
  • Try running the compact operation without the 'prompt_cache_retention' parameter to see if it succeeds.
  • If the issue persists, consider reaching out to the Codex CLI support team for further assistance with the 'invalid_request_error'.

Notes

The provided information does not include the exact command used for the compact operation, so it is unclear how the 'prompt_cache_retention' parameter is being passed. Additionally, the Terminal.app emulator is mentioned, but it is unlikely to be the cause of the issue.

Recommendation

Apply workaround: Remove or update the 'prompt_cache_retention' parameter to a supported value, as the error message indicates that it is an unknown parameter.

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