Resumed CLI thread stalls with no first event after Codex replays multi-megabyte base64 image tool outputs
What version of Codex CLI is running?
codex-cli 0.144.3
What subscription do you have?
plus
Which model were you using?
gpt-5.6-sol
What platform is your computer?
Microsoft Windows NT 10.0.26100.0 x64
What terminal emulator and version are you using (if applicable)?
PowerShell
Codex doctor report
{
"schemaVersion": 1,
"generatedAt": "1783939439s since unix epoch",
"overallStatus": "warning",
"codexVersion": "0.144.3",
"checks": {
"app_server.status": {
"id": "app_server.status",
"category": "app-server",
"status": "ok",
"summary": "background server is not running",
"details": {
"control socket": "C:\\Users\\<USER>\\.codex\\app-server-control\\app-server-control.sock",
"daemon state dir": "C:\\Users\\<USER>\\.codex\\app-server-daemon",
"mode": "ephemeral",
"pid file": "C:\\Users\\<USER>\\.codex\\app-server-daemon\\app-server.pid (missing)",
"settings": "C:\\Users\\<USER>\\.codex\\app-server-daemon\\settings.json (missing)",
"status": "not running",
"update-loop pid file": "C:\\Users\\<USER>\\.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 file": "C:\\Users\\<USER>\\.codex\\auth.json",
"auth storage mode": "File",
"stored API key": "true",
"stored ChatGPT tokens": "false",
"stored agent identity": "false",
"stored auth mode": "api_key"
},
"remediation": null,
"durationMs": 0
},
"config.load": {
"id": "config.load",
"category": "config",
"status": "ok",
"summary": "config loaded",
"details": {
"CODEX_HOME": "C:\\Users\\<USER>\\.codex",
"config.toml": "C:\\Users\\<USER>\\.codex\\config.toml",
"config.toml parse": "ok",
"cwd": "<WORKSPACE>",
"enabled feature flags": "<redacted>",
"feature flag overrides": "none",
"feature flags enabled": "35",
"log dir": "C:\\Users\\<USER>\\.codex\\log",
"mcp servers": "0",
"model": "<CUSTOM_MODEL>",
"model provider": "custom",
"sqlite home": "C:\\Users\\<USER>\\.codex"
},
"remediation": null,
"durationMs": 0
},
"git.environment": {
"id": "git.environment",
"category": "git",
"status": "ok",
"summary": "git version 2.54.0.windows.1",
"details": {
".git entry": "directory",
"PATH git #1": "<GIT_EXECUTABLE>",
"PATH git entries": "1",
"git build options": "git version 2.54.0.windows.1; cpu: x86_64; built from commit: 2b8a3ab140826ac423c2845ef81d4c6ac4f7bf3c; sizeof-long: 4; sizeof-size_t: 8; shell-path: D:/git-sdk-64-build-installers/usr/bin/sh; rust: disabled; feature: fsmonitor--daemon; gettext: enabled; libcurl: 8.19.0; OpenSSL: OpenSSL 3.5.6 7 Apr 2026; zlib: 1.3.2; SHA-1: SHA1_DC; SHA-256: SHA256_BLK; default-ref-format: files; default-hash: sha1",
"git exec path": "<GIT_EXEC_PATH>",
"git version": "git version 2.54.0.windows.1",
"repo detected": "true",
"repo root": "<WORKSPACE>",
"selected git": "<GIT_EXECUTABLE>"
},
"remediation": null,
"durationMs": 874
},
"installation": {
"id": "installation",
"category": "install",
"status": "ok",
"summary": "installation looks consistent",
"details": {
"PATH codex #1": "C:\\nvm4w\\nodejs\\codex",
"PATH codex #2": "C:\\nvm4w\\nodejs\\codex.cmd",
"PATH codex entries": "2",
"current executable": "C:\\Users\\<USER>\\AppData\\Local\\nvm\\v24.16.0\\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\\<USER>\\AppData\\Local\\nvm\\v24.16.0\\node_modules\\@openai\\codex\\node_modules\\@openai\\codex-win32-x64\\vendor\\x86_64-pc-windows-msvc, bin C:\\Users\\<USER>\\AppData\\Local\\nvm\\v24.16.0\\node_modules\\@openai\\codex\\node_modules\\@openai\\codex-win32-x64\\vendor\\x86_64-pc-windows-msvc\\bin, resources C:\\Users\\<USER>\\AppData\\Local\\nvm\\v24.16.0\\node_modules\\@openai\\codex\\node_modules\\@openai\\codex-win32-x64\\vendor\\x86_64-pc-windows-msvc\\codex-resources, path C:\\Users\\<USER>\\AppData\\Local\\nvm\\v24.16.0\\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\\<USER>\\AppData\\Local\\nvm\\v24.16.0\\node_modules\\@openai\\codex",
"npm update target": "C:\\nvm4w\\nodejs\\node_modules\\@openai\\codex"
},
"remediation": null,
"durationMs": 1327
},
"mcp.config": {
"id": "mcp.config",
"category": "mcp",
"status": "ok",
"summary": "no MCP servers configured",
"details": {},
"remediation": null,
"durationMs": 0
},
"network.env": {
"id": "network.env",
"category": "network",
"status": "ok",
"summary": "network-related environment looks readable",
"details": {
"SSL_CERT_FILE": "readable file C:\\Users\\<USER>\\miniconda3\\Library\\ssl\\cacert.pem",
"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": {
"custom API base URL": "https://<CUSTOM_PROVIDER_HOST>/v1 reachable (HTTP 404)",
"custom API route probe": "https://<CUSTOM_PROVIDER_HOST>/v1/<redacted> route exists (HTTP 401)",
"reachability mode": "API key auth"
},
"remediation": null,
"durationMs": 906
},
"network.websocket_reachability": {
"id": "network.websocket_reachability",
"category": "websocket",
"status": "ok",
"summary": "Responses WebSocket is not enabled for the active provider",
"details": {
"model provider": "custom",
"provider name": "custom",
"proxy env vars": "none",
"supports websockets": "false",
"wire API": "responses"
},
"remediation": null,
"durationMs": 0
},
"runtime.provenance": {
"id": "runtime.provenance",
"category": "runtime",
"status": "ok",
"summary": "running npm on windows-x86_64",
"details": {
"commit": "unknown",
"current executable": "C:\\Users\\<USER>\\AppData\\Local\\nvm\\v24.16.0\\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\\<USER>\\AppData\\Local\\nvm\\v24.16.0\\node_modules\\@openai\\codex\\node_modules\\@openai\\codex-win32-x64\\vendor\\x86_64-pc-windows-msvc, bin C:\\Users\\<USER>\\AppData\\Local\\nvm\\v24.16.0\\node_modules\\@openai\\codex\\node_modules\\@openai\\codex-win32-x64\\vendor\\x86_64-pc-windows-msvc\\bin, resources C:\\Users\\<USER>\\AppData\\Local\\nvm\\v24.16.0\\node_modules\\@openai\\codex\\node_modules\\@openai\\codex-win32-x64\\vendor\\x86_64-pc-windows-msvc\\codex-resources, path C:\\Users\\<USER>\\AppData\\Local\\nvm\\v24.16.0\\node_modules\\@openai\\codex\\node_modules\\@openai\\codex-win32-x64\\vendor\\x86_64-pc-windows-msvc\\codex-path)",
"platform": "windows-x86_64",
"version": "0.144.3"
},
"remediation": null,
"durationMs": 0
},
"runtime.search": {
"id": "runtime.search",
"category": "search",
"status": "ok",
"summary": "search is OK (bundled)",
"details": {
"search command": "C:\\Users\\<USER>\\AppData\\Local\\nvm\\v24.16.0\\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\\<USER>\\.codex (dir)",
"active rollout files": "85 files, 199704577 total bytes, 2349465 average bytes",
"archived rollout files": "0 files, 0 total bytes, 0 average bytes",
"goals DB": "C:\\Users\\<USER>\\.codex\\goals_1.sqlite (file)",
"goals DB integrity": "ok",
"log DB": "C:\\Users\\<USER>\\.codex\\logs_2.sqlite (file)",
"log DB integrity": "ok",
"log dir": "C:\\Users\\<USER>\\.codex\\log (missing)",
"memories DB": "C:\\Users\\<USER>\\.codex\\memories_1.sqlite (file)",
"memories DB integrity": "ok",
"sqlite home": "C:\\Users\\<USER>\\.codex (dir)",
"state DB": "C:\\Users\\<USER>\\.codex\\state_5.sqlite (file)",
"state DB integrity": "ok"
},
"remediation": null,
"durationMs": 472
},
"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": "custom",
"rollout DB active files": "85",
"rollout DB active rows": "85",
"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": "custom=85",
"rollout DB rows": "85",
"rollout DB scan cap reached": "false",
"rollout DB scan errors": "0",
"rollout DB sources": "cli=48, vscode=33, subagent:other=4",
"rollout DB stale rows": "0"
},
"remediation": null,
"durationMs": 1409
},
"system.environment": {
"id": "system.environment",
"category": "system",
"status": "ok",
"summary": "OS language zh-CN",
"details": {
"EDITOR": "not set",
"LANG": "en_US.UTF-8",
"VISUAL": "not set",
"os": "Windows 10.0.26100 (Windows 11 Professional) [64-bit]",
"os language": "zh-CN",
"os type": "Windows",
"os version": "10.0.26100"
},
"remediation": null,
"durationMs": 0
},
"terminal.env": {
"id": "terminal.env",
"category": "terminal",
"status": "ok",
"summary": "terminal metadata was detected",
"details": {
"COLORTERM": "truecolor",
"TERM_PROGRAM": "vscode",
"VSCODE_INJECTION": "present",
"color output": "disabled (stdout is not a terminal)",
"console input code page": "936",
"console output code page": "65001",
"effective locale": "en_US.UTF-8",
"stderr console mode": "unavailable",
"stderr is terminal": "false",
"stdin is terminal": "false",
"stdout console mode": "unavailable",
"stdout is terminal": "false",
"terminal": "VS Code",
"terminal size": "197x48",
"terminal version": "1.128.0"
},
"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": "git repo root",
"terminal title project value": "<PROJECT>",
"terminal title source": "default"
},
"remediation": null,
"durationMs": 0
},
"updates.status": {
"id": "updates.status",
"category": "updates",
"status": "warning",
"summary": "update configuration is locally consistent",
"details": {
"cached latest version": "0.144.3",
"check for update on startup": "true",
"last checked at": "2026-07-13T06:25:57.571315400Z",
"latest version probe": "curl: (28) Operation timed out after 5013 milliseconds with 198665 out of 327817 bytes received",
"npm update target": "C:\\nvm4w\\nodejs\\node_modules\\@openai\\codex",
"update action": "npm install -g @openai/codex",
"version cache": "C:\\Users\\<USER>\\.codex\\version.json"
},
"remediation": null,
"durationMs": 6259
}
}
}
What issue are you seeing?
A long Codex CLI/TUI thread stopped producing any visible output on later turns and after resume. A minimal text prompt remained pending for 4–5 minutes with no first streamed assistant/tool/usage event. I manually interrupted each attempt. Switching between two model routes on the same custom Responses provider did not help, while new threads using the same provider continued to work.
The affected local rollout is valid JSONL but contains several custom_tool_call_output records with full data:image/...;base64 image_url values. The rollout is 12,818,822 bytes. Five image strings are approximately 4,041,662, 3,982,262, 1,841,814, 1,675,006, and 214,894 characters, accounting for about 11.75 MB.
The last successful request used 149,815 input tokens with a reported 353,400-token context window, so this was not a normal context-window overflow. Later interrupted turns recorded zero last-turn usage and no actionable provider/client error.
What steps can reproduce the bug?
- Start a Codex CLI/TUI thread using local legacy history.
- Run an image-heavy workflow and call image-producing/viewing tools repeatedly, so tool outputs contain full data:image/*;base64 image_url payloads.
- Continue until several multi-megabyte image tool outputs are stored in the rollout, while the model-visible token count remains below the context window.
- Exit and resume the thread.
- Send a minimal text-only prompt such as "continue".
- Observe that no first streamed event or usage arrives for several minutes. Switching the model does not help because the same image-heavy history is replayed.
Affected thread ID: 019f5a28-fc36-7281-b489-895d93e4ae91
Codex CLI: created on 0.144.1, reproduced/inspected on 0.144.3
Platform: Windows 11 x64
History mode: legacy
Provider: custom OpenAI-compatible Responses API (endpoint and credentials redacted)
What is the expected behavior?
Codex should not resend old multi-megabyte base64 image tool outputs on every subsequent turn or resume. After the consuming turn, historical images should be externalized, deduplicated, replaced with compact references/digests, or omitted unless explicitly needed again.
Compaction and request guards should consider serialized/multimodal byte size as well as text-token pressure. If a request is still too large, Codex should fail quickly with an actionable diagnostic instead of waiting indefinitely without a first event.
Additional information
codex doctor --jsonreports overallStatus=warning only because the latest-version probe timed out; npm independently reports 0.144.3 as latest.- Auth, config parsing, provider HTTP reachability, state DB integrity, and rollout/DB parity all pass.
- The state DB contains the affected thread and correct rollout path; this is not a missing-index problem.
- The thread accumulated 8,469,180 input tokens over its lifetime; the last successful single request was about 149,815 input tokens.
- The turn_aborted/rollback records are consequences of manual interruption after 4–5 minutes without output, not the initiating failure.
- The custom provider may contribute to the long no-output behavior, but the large replayable base64 payloads are already present in Codex history before provider conversion.
- Raw rollout JSONL is intentionally not attached because it contains private prompts, local paths, tool history, and embedded images. A sanitized structural report can be provided if requested.
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗