0.147.0 intermittently sends unsupported prompt_cache_retention to gpt-5.6-so
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 125k
- Forks
- 19.4k
- PR merge metrics
- PR metrics pending
Description
What version of Codex CLI is running?
codex-cli 0.147.0
What subscription do you have?
Pro 20x
Which model were you using?
gpt-5.6-sol
What platform is your computer?
Microsoft Windows NT 10.0.26220.0 x64
What terminal emulator and version are you using (if applicable)?
No response
Codex doctor report
{
"schemaVersion": 1,
"generatedAt": "1787124240s since unix epoch",
"overallStatus": "warning",
"codexVersion": "0.147.0",
"checks": {
"app_server.status": {
"id": "app_server.status",
"category": "app-server",
"status": "ok",
"summary": "background server is not running",
"details": {
"control socket": "C:\\Users\\linzh\\.codex\\app-server-control\\app-server-control.sock",
"daemon state dir": "C:\\Users\\linzh\\.codex\\app-server-daemon",
"mode": "ephemeral",
"pid file": "C:\\Users\\linzh\\.codex\\app-server-daemon\\app-server.pid (missing)",
"settings": "C:\\Users\\linzh\\.codex\\app-server-daemon\\settings.json (missing)",
"status": "not running",
"update-loop pid file": "C:\\Users\\linzh\\.codex\\app-server-daemon\\app-server-updater.pid (missing)"
},
"remediation": null,
"durationMs": 0
},
"auth.credentials": {
"id": "auth.credentials",
"category": "auth",
"status": "ok",
"summary": "auth is configured",
"details": {
"auth env vars present": "OPENAI_API_KEY",
"auth file": "C:\\Users\\linzh\\.codex\\auth.json",
"auth storage mode": "File",
"stored API key": "false",
"stored ChatGPT tokens": "true",
"stored agent identity": "false",
"stored auth mode": "chatgpt"
},
"remediation": null,
"durationMs": 0
},
"config.load": {
"id": "config.load",
"category": "config",
"status": "ok",
"summary": "config loaded",
"details": {
"CODEX_HOME": "C:\\Users\\linzh\\.codex",
"config.toml": "C:\\Users\\linzh\\.codex\\config.toml",
"config.toml parse": "ok",
"cwd": "C:\\Users\\linzh",
"enabled feature flags": "<redacted>",
"feature flag overrides": "apps=false, prevent_idle_sleep=true",
"feature flags enabled": "39",
"log dir": "C:\\Users\\linzh\\.codex\\log",
"mcp servers": "1",
"model": "gpt-5.6-sol",
"model provider": "openai",
"sqlite home": "C:\\Users\\linzh\\.codex"
},
"remediation": null,
"durationMs": 0
},
"git.environment": {
"id": "git.environment",
"category": "git",
"status": "ok",
"summary": "git version 2.55.0.windows.3",
"details": {
"PATH git #1": "C:\\Users\\linzh\\scoop\\apps\\git\\current\\cmd\\git.exe",
"PATH git #2": "C:\\Users\\linzh\\scoop\\shims\\git.exe",
"PATH git entries": "2",
"git build options": "git version 2.55.0.windows.3; cpu: x86_64; built from commit: 52ca1113d651127f89477a8763f86ab20f645e1d; sizeof-long: 4; sizeof-size_t: 8; shell-path: D:/git-sdk-64/usr/bin/sh; rust: disabled; feature: fsmonitor--daemon; gettext: enabled; libcurl: 8.21.0; OpenSSL: OpenSSL 3.5.7 9 Jun 2026; zlib: 1.3.2; SHA-1: SHA1_DC; SHA-256: SHA256_BLK; default-ref-format: files; default-hash: sha1",
"git exec path": "C:/Users/linzh/scoop/apps/git/2.55.0.3/mingw64/libexec/git-core",
"git version": "git version 2.55.0.windows.3",
"repo detected": "false",
"selected git": "C:\\Users\\linzh\\scoop\\apps\\git\\current\\cmd\\git.exe"
},
"remediation": null,
"durationMs": 73
},
"installation": {
"id": "installation",
"category": "install",
"status": "ok",
"summary": "installation looks consistent",
"details": {
"PATH codex #1": "C:\\Users\\linzh\\AppData\\Roaming\\npm\\codex",
"PATH codex #2": "C:\\Users\\linzh\\AppData\\Roaming\\npm\\codex.cmd",
"PATH codex entries": "2",
"current executable": "C:\\Users\\linzh\\AppData\\Roaming\\npm\\node_modules\\@openai\\codex\\node_modules\\@openai\\codex-win32-x64\\vendor\\x86_64-pc-windows-msvc\\bin\\codex.exe",
"install context": "npm (package C:\\Users\\linzh\\AppData\\Roaming\\npm\\node_modules\\@openai\\codex\\node_modules\\@openai\\codex-win32-x64\\vendor\\x86_64-pc-windows-msvc, bin C:\\Users\\linzh\\AppData\\Roaming\\npm\\node_modules\\@openai\\codex\\node_modules\\@openai\\codex-win32-x64\\vendor\\x86_64-pc-windows-msvc\\bin, resources C:\\Users\\linzh\\AppData\\Roaming\\npm\\node_modules\\@openai\\codex\\node_modules\\@openai\\codex-win32-x64\\vendor\\x86_64-pc-windows-msvc\\codex-resources, path C:\\Users\\linzh\\AppData\\Roaming\\npm\\node_modules\\@openai\\codex\\node_modules\\@openai\\codex-win32-x64\\vendor\\x86_64-pc-windows-msvc\\codex-path)",
"managed by bun": "false",
"managed by npm": "true",
"managed by pnpm": "false",
"managed package root": "C:\\Users\\linzh\\AppData\\Roaming\\npm\\node_modules\\@openai\\codex",
"npm update target": "C:\\Users\\linzh\\AppData\\Roaming\\npm\\node_modules\\@openai\\codex"
},
"remediation": null,
"durationMs": 339
},
"mcp.config": {
"id": "mcp.config",
"category": "mcp",
"status": "ok",
"summary": "MCP configuration is locally consistent",
"details": {
"configured servers": "1",
"disabled servers": "0",
"stdio servers": "1"
},
"remediation": null,
"durationMs": 0
},
"network.env": {
"id": "network.env",
"category": "network",
"status": "ok",
"summary": "network-related environment looks readable",
"details": {
"proxy env vars": "none"
},
"remediation": null,
"durationMs": 0
},
"network.provider_reachability": {
"id": "network.provider_reachability",
"category": "reachability",
"status": "ok",
"summary": "active provider endpoints are reachable over HTTP",
"details": {
"openai API base URL": "https://api.openai.com/v1 reachable (HTTP 404)",
"openai API route probe": "https://api.openai.com/v1/<redacted> route exists (HTTP 401)",
"reachability mode": "API key auth"
},
"remediation": null,
"durationMs": 2737
},
"network.websocket_reachability": {
"id": "network.websocket_reachability",
"category": "websocket",
"status": "warning",
"summary": "Responses WebSocket timed out; HTTPS fallback may still work",
"details": {
"DNS": "1 IPv4, 0 IPv6, first IPv4",
"auth mode": "chatgpt",
"connect timeout": "15000 ms",
"endpoint": "wss://chatgpt.com/backend-api/<redacted>",
"model provider": "openai",
"provider name": "OpenAI",
"proxy env vars": "none",
"supports websockets": "true",
"wire API": "responses"
},
"notes": [
"handshake timed out"
],
"remediation": "Check proxy, VPN, firewall, DNS, custom CA, and WebSocket policy support.",
"durationMs": 15052
},
"runtime.provenance": {
"id": "runtime.provenance",
"category": "runtime",
"status": "ok",
"summary": "running npm on windows-x86_64",
"details": {
"commit": "unknown",
"current executable": "C:\\Users\\linzh\\AppData\\Roaming\\npm\\node_modules\\@openai\\codex\\node_modules\\@openai\\codex-win32-x64\\vendor\\x86_64-pc-windows-msvc\\bin\\codex.exe",
"install method": "npm (package C:\\Users\\linzh\\AppData\\Roaming\\npm\\node_modules\\@openai\\codex\\node_modules\\@openai\\codex-win32-x64\\vendor\\x86_64-pc-windows-msvc, bin C:\\Users\\linzh\\AppData\\Roaming\\npm\\node_modules\\@openai\\codex\\node_modules\\@openai\\codex-win32-x64\\vendor\\x86_64-pc-windows-msvc\\bin, resources C:\\Users\\linzh\\AppData\\Roaming\\npm\\node_modules\\@openai\\codex\\node_modules\\@openai\\codex-win32-x64\\vendor\\x86_64-pc-windows-msvc\\codex-resources, path C:\\Users\\linzh\\AppData\\Roaming\\npm\\node_modules\\@openai\\codex\\node_modules\\@openai\\codex-win32-x64\\vendor\\x86_64-pc-windows-msvc\\codex-path)",
"platform": "windows-x86_64",
"version": "0.147.0"
},
"remediation": null,
"durationMs": 0
},
"runtime.search": {
"id": "runtime.search",
"category": "search",
"status": "ok",
"summary": "search is OK (bundled)",
"details": {
"search command": "C:\\Users\\linzh\\AppData\\Roaming\\npm\\node_modules\\@openai\\codex\\node_modules\\@openai\\codex-win32-x64\\vendor\\x86_64-pc-windows-msvc\\codex-path\\rg.exe",
"search command readiness": "file exists",
"search provider": "bundled"
},
"remediation": null,
"durationMs": 0
},
"sandbox.helpers": {
"id": "sandbox.helpers",
"category": "sandbox",
"status": "ok",
"summary": "sandbox configuration is readable",
"details": {
"approval policy": "OnRequest",
"codex-linux-sandbox helper": "none",
"execve wrapper helper": "none",
"filesystem sandbox": "restricted",
"network sandbox": "restricted"
},
"remediation": null,
"durationMs": 0
},
"state.paths": {
"id": "state.paths",
"category": "state",
"status": "ok",
"summary": "state paths and databases are inspectable",
"details": {
"CODEX_HOME": "C:\\Users\\linzh\\.codex (dir)",
"active rollout files": "603 files, 3545955504 total bytes, 5880523 average bytes",
"archived rollout files": "0 files, 0 total bytes, 0 average bytes",
"goals DB": "C:\\Users\\linzh\\.codex\\goals_1.sqlite (file)",
"goals DB integrity": "ok",
"log DB": "C:\\Users\\linzh\\.codex\\logs_2.sqlite (file)",
"log DB integrity": "ok",
"log dir": "C:\\Users\\linzh\\.codex\\log (missing)",
"memories DB": "C:\\Users\\linzh\\.codex\\memories_1.sqlite (file)",
"memories DB integrity": "ok",
"queue DB": "C:\\Users\\linzh\\.codex\\queue_1.sqlite (file)",
"queue DB integrity": "ok",
"sqlite home": "C:\\Users\\linzh\\.codex (dir)",
"state DB": "C:\\Users\\linzh\\.codex\\state_5.sqlite (file)",
"state DB integrity": "ok",
"thread history DB": "C:\\Users\\linzh\\.codex\\thread_history_1.sqlite (file)",
"thread history DB integrity": "ok"
},
"remediation": null,
"durationMs": 3385
},
"state.rollout_db_parity": {
"id": "state.rollout_db_parity",
"category": "threads",
"status": "ok",
"summary": "rollout files and state DB thread inventory agree",
"details": {
"default model provider": "openai",
"rollout DB active files": "603",
"rollout DB active rows": "603",
"rollout DB archive mismatches": "0",
"rollout DB archived files": "0",
"rollout DB archived rows": "0",
"rollout DB duplicate DB paths": "0",
"rollout DB duplicate rollout thread ids": "0",
"rollout DB malformed file names": "0",
"rollout DB missing active rows": "0",
"rollout DB missing archived rows": "0",
"rollout DB model providers": "openai=603",
"rollout DB rows": "603",
"rollout DB scan cap reached": "false",
"rollout DB scan errors": "0",
"rollout DB sources": "subagent:thread_spawn=401, cli=180, subagent:other=12, vscode=9, exec=1",
"rollout DB stale rows": "0"
},
"remediation": null,
"durationMs": 5508
},
"system.environment": {
"id": "system.environment",
"category": "system",
"status": "ok",
"summary": "OS language zh-CN",
"details": {
"EDITOR": "set",
"VISUAL": "not set",
"os": "Windows 10.0.26220 (Windows 11 ProfessionalWorkstation) [64-bit]",
"os language": "zh-CN",
"os type": "Windows",
"os version": "10.0.26220"
},
"remediation": null,
"durationMs": 0
},
"terminal.env": {
"id": "terminal.env",
"category": "terminal",
"status": "ok",
"summary": "terminal metadata was detected",
"details": {
"WT_SESSION": "present",
"color output": "enabled",
"console input code page": "936",
"console output code page": "936",
"stderr console mode": "0x00000007 (VT processing: true)",
"stderr is terminal": "true",
"stdin is terminal": "true",
"stdout console mode": "0x00000007 (VT processing: true)",
"stdout is terminal": "true",
"terminal": "Windows Terminal",
"terminal size": "120x30"
},
"remediation": null,
"durationMs": 0
},
"terminal.title": {
"id": "terminal.title",
"category": "title",
"status": "ok",
"summary": "terminal title default",
"details": {
"terminal title activity": "true",
"terminal title items": "activity, project-name",
"terminal title project source": "cwd",
"terminal title project value": "linzh",
"terminal title source": "default"
},
"remediation": null,
"durationMs": 0
},
"updates.status": {
"id": "updates.status",
"category": "updates",
"status": "ok",
"summary": "update configuration is locally consistent",
"details": {
"cached latest version": "0.148.0",
"check for update on startup": "true",
"dismissed version": "0.148.0",
"last checked at": "2026-08-19T03:32:01.604972200Z",
"latest version": "0.148.0",
"latest version status": "newer version is available",
"npm update target": "C:\\Users\\linzh\\AppData\\Roaming\\npm\\node_modules\\@openai\\codex",
"update action": "npm install -g @openai/codex",
"version cache": "C:\\Users\\linzh\\.codex\\version.json"
},
"remediation": null,
"durationMs": 937
}
}
}
What issue are you seeing?
When using gpt-5.6-sol with Codex CLI 0.147.0, Codex intermittently fails with the following error:
{
"error": {
"message": "prompt_cache_retention is not supported on this model",
"type": "invalid_request_error",
"param": "prompt_cache_retention",
"code": "invalid_parameter"
}
}
This appears related to #39397, but importantly I can reproduce the same error on 0.147.0 as well.
Unlike the behavior reported for 0.148.0, the issue is intermittent on 0.147.0. Most turns may work normally, while an occasional turn suddenly fails with this error.
The failure can happen after Codex has already completed multiple tool calls successfully. The tool calls finish, but the turn then fails when Codex attempts to continue or return the final response.
In my latest reproduction, Codex showed approximately 88% context remaining and 56.1K tokens used, so this does not appear to require a nearly full context window or context compaction.
What steps can reproduce the bug?
-
Install Codex CLI
0.147.0. -
Select
gpt-5.6-sol. -
Start or resume a normal coding session.
-
Let Codex perform normal repository inspection and tool calls.
-
Continue working for multiple turns.
-
Eventually, a turn may fail with:
prompt_cache_retention is not supported on this model -
Sending
continuemay trigger the same error again.
The issue is intermittent on 0.147.0, so it may require multiple turns before it reproduces.
What is the expected behavior?
Codex should not send prompt_cache_retention to gpt-5.6-sol when that model does not support the parameter.
All request paths targeting gpt-5.6-sol should apply the appropriate model capability check before attaching prompt-cache-related parameters.
Normal coding sessions should continue without failing because of an unsupported parameter added internally by Codex.
Additional information
Environment
- OS: Windows 11 Pro for Workstations Insider Preview (Build 26220, 64-bit)
- Node.js: v24.14.0
- npm: 11.9.0
- Codex CLI version: codex-cli 0.147.0
- CPU: Intel Core i7-14650HX (16 cores / 24 threads)
- RAM: 39.7 GB
- Hardware: LENOVO 21N5
- Shell: cmd.exe (Windows), PowerShell 7.6.5
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the Codex CLI 0.147.0 request path for the gpt-5.6-sol model and compare intermittent requests that include prompt_cache_retention with requests accepted by the model. Reproduce the failure on Windows if possible, then verify that requests no longer send the unsupported parameter and that the affected model continues to work.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- api, cli
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100