codex - 💡(How to fix) Fix 0.120.0 regression: resumed threads fail during remote compaction with "Unknown parameter: 'prompt_cache_retention'" [3 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#17819Fetched 2026-04-15 06:27:36
View on GitHub
Comments
3
Participants
4
Timeline
8
Reactions
1
Timeline (top)
labeled ×4commented ×3closed ×1

Error Message

  • client environment: Qodex Desktop, but the root error is visible in the Codex app-server/chat log Error running remote compact task: { "error": {
  • In my app, a separate UI bug initially made the error appear as just }, but that was only a formatting issue. The real runtime error is the prompt_cache_retention rejection above.

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

---

remote compaction failed
Failed to run pre-sampling compact

---

npm install -g @openai/codex@0.119.0
RAW_BUFFERClick to expand / collapse

After upgrading Codex CLI to 0.120.0, resumed long-running threads started failing when context compaction kicked in. Rolling back to 0.119.0 immediately resolved the problem in the same environment.

Environment:

  • macOS
  • Codex installed globally via npm
  • version that fails: 0.120.0
  • version that works: 0.119.0
  • client environment: Qodex Desktop, but the root error is visible in the Codex app-server/chat log

Steps to reproduce:

  1. Install @openai/[email protected]
  2. Resume an existing thread with enough history to trigger context compaction
  3. Let the turn continue until compaction runs
  4. Observe the turn failure

Actual result:

  • the resumed turn fails during compaction
  • log shows:
Error running remote compact task: {
  "error": {
    "message": "Unknown parameter: 'prompt_cache_retention'.",
    "type": "invalid_request_error",
    "param": "prompt_cache_retention",
    "code": "unknown_parameter"
  }
}

Related runtime lines also include:

remote compaction failed
Failed to run pre-sampling compact

Expected result:

  • the thread should compact successfully and continue responding

Regression evidence:

  • downgrading to @openai/[email protected] in the same environment immediately fixed the issue
  • after rollback, the same session compacted context and continued responding normally

Rollback command:

npm install -g @openai/[email protected]

Notes:

  • This looks like a 0.120.0 regression in the remote compaction path for resumed threads.
  • In my app, a separate UI bug initially made the error appear as just }, but that was only a formatting issue. The real runtime error is the prompt_cache_retention rejection above.

extent analysis

TL;DR

The issue can likely be fixed by downgrading to Codex CLI version 0.119.0 due to a regression in the remote compaction path for resumed threads in version 0.120.0.

Guidance

  • The error message "Unknown parameter: 'prompt_cache_retention'" suggests that the prompt_cache_retention parameter is not supported in the current version of the Codex CLI, which could be causing the compaction failure.
  • To verify the issue, try reproducing the steps with the 0.120.0 version and observe the error log to confirm the "Unknown parameter" error.
  • Downgrading to 0.119.0 using the provided rollback command npm install -g @openai/[email protected] may resolve the issue, as it has worked for the reporter.
  • If the issue persists, it may be worth investigating any changes to the prompt_cache_retention parameter in the 0.120.0 version and how it affects the compaction process.

Example

No code snippet is provided as the issue seems to be related to a version regression rather than a code-specific problem.

Notes

The provided information suggests a clear regression in the 0.120.0 version, and downgrading to 0.119.0 resolves the issue. However, it's unclear what changes were made in 0.120.0 that introduced this regression, and further investigation may be necessary to understand the root cause.

Recommendation

Apply workaround: Downgrade to 0.119.0 using the provided rollback command, as it has been confirmed to resolve the issue in the same environment. This is a safe and immediate solution until the regression in 0.120.0 is addressed.

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