codex - 💡(How to fix) Fix Codex CLI v0.120.0 fails to resume old sessions: Unknown parameter 'prompt_cache_retention' [4 comments, 4 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#17814Fetched 2026-04-15 06:27:43
View on GitHub
Comments
4
Participants
4
Timeline
12
Reactions
0
Timeline (top)
commented ×4labeled ×4cross-referenced ×2closed ×1

Resuming an older Codex session consistently fails with a remote compact error.

Environment

  • Codex CLI: 0.120.0
  • OS: macOS
  • Model: gpt-5.4
  • Session ID: 019d6fa0-db65-7f83-9531-35df54674d76

Exact repro

codex resume 019d6fa0-db65-7f83-9531-35df54674d76 "ping" --no-alt-screen

I also tried:

codex resume 019d6fa0-db65-7f83-9531-35df54674d76 "ping" --no-alt-screen --disable enable_request_compression

Actual result

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

Expected result

The session should resume normally, or compact successfully without sending unsupported parameters.

Notes

- I could reproduce this directly from the CLI.
- The failure appears tied to remote compaction of a large old session.
- I did not find prompt_cache_retention in my local editable Codex config.

Error Message

Resuming an older Codex session consistently fails with a remote compact error. Error running remote compact task: { "error": {

Root Cause

Resuming an older Codex session consistently fails with a remote compact error.

Environment

  • Codex CLI: 0.120.0
  • OS: macOS
  • Model: gpt-5.4
  • Session ID: 019d6fa0-db65-7f83-9531-35df54674d76

Exact repro

codex resume 019d6fa0-db65-7f83-9531-35df54674d76 "ping" --no-alt-screen

I also tried:

codex resume 019d6fa0-db65-7f83-9531-35df54674d76 "ping" --no-alt-screen --disable enable_request_compression

Actual result

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

Expected result

The session should resume normally, or compact successfully without sending unsupported parameters.

Notes

- I could reproduce this directly from the CLI.
- The failure appears tied to remote compaction of a large old session.
- I did not find prompt_cache_retention in my local editable Codex config.
RAW_BUFFERClick to expand / collapse

Summary

Resuming an older Codex session consistently fails with a remote compact error.

Environment

  • Codex CLI: 0.120.0
  • OS: macOS
  • Model: gpt-5.4
  • Session ID: 019d6fa0-db65-7f83-9531-35df54674d76

Exact repro

codex resume 019d6fa0-db65-7f83-9531-35df54674d76 "ping" --no-alt-screen

I also tried:

codex resume 019d6fa0-db65-7f83-9531-35df54674d76 "ping" --no-alt-screen --disable enable_request_compression

Actual result

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

Expected result

The session should resume normally, or compact successfully without sending unsupported parameters.

Notes

- I could reproduce this directly from the CLI.
- The failure appears tied to remote compaction of a large old session.
- I did not find prompt_cache_retention in my local editable Codex config.

extent analysis

TL;DR

Removing the unsupported prompt_cache_retention parameter from the request may resolve the remote compact error when resuming an older Codex session.

Guidance

  • Verify that the prompt_cache_retention parameter is not set in your local Codex configuration to ensure it's not being sent with the resume request.
  • Check the Codex documentation for any updates on supported parameters for the codex resume command, especially in relation to remote compaction.
  • Consider using a version of the Codex CLI that might have resolved issues related to parameter handling in remote compaction, if available.
  • If the issue persists, try removing any other potentially unsupported parameters from the request to isolate the cause.

Example

No specific code example is provided as the issue seems related to command-line arguments rather than code snippets.

Notes

The solution assumes that the error message accurately reflects the problem. If the prompt_cache_retention parameter is required for other functionality, removing it might have unintended consequences. It's also unclear if this parameter is supposed to be supported but is currently broken or if it's genuinely unsupported.

Recommendation

Apply workaround: Remove the prompt_cache_retention parameter from the request, as it seems to be the direct cause of the error, and verify if this resolves the issue without causing other problems.

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 Codex CLI v0.120.0 fails to resume old sessions: Unknown parameter 'prompt_cache_retention' [4 comments, 4 participants]