Error running remote compact task: Fatal error: remote compaction v2 expected exactly one compaction output item, got 0 from 0 output items
Resolved 💬 8 comments Opened Jun 16, 2026 by cowwoc Closed Jun 29, 2026
💡 Likely answer: A maintainer (etraut-openai, contributor)
responded on this thread — see the highlighted reply below.
What version of Codex CLI is running?
codex-cli 0.140.0
What subscription do you have?
Pro 20x
Which model were you using?
gpt-5.4
What platform is your computer?
Linux 6.18.33.1-microsoft-standard-WSL2 x86_64 x86_64
What terminal emulator and version are you using (if applicable)?
Windows Terminal
Codex doctor report
{
"schemaVersion": 1,
"generatedAt": "1781645983s since unix epoch",
"overallStatus": "warning",
"codexVersion": "0.139.0",
"checks": {
"app_server.status": {
"id": "app_server.status",
"category": "app-server",
"status": "ok",
"summary": "background server is not running",
"details": {
"control socket": "/home/gili/.codex/app-server-control/app-server-control.sock",
"daemon state dir": "/home/gili/.codex/app-server-daemon",
"mode": "ephemeral",
"pid file": "/home/gili/.codex/app-server-daemon/app-server.pid (missing)",
"settings": "/home/gili/.codex/app-server-daemon/settings.json (missing)",
"status": "not running",
"update-loop pid file": "/home/gili/.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": "/home/gili/.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": "warning",
"summary": "config loaded",
"details": {
"CODEX_HOME": "/home/gili/.codex",
"config.toml": "/home/gili/.codex/config.toml",
"config.toml parse": "ok",
"cwd": "/mnt/c/Users/Gili",
"enabled feature flags": "shell_tool, unified_exec, shell_snapshot, terminal_resize_reflow, sqlite, hooks, enable_request_compression, multi_agent, apps, tool_suggest, plugins, in_app_browser, browser_use, browser_use_external, computer_use, plugin_sharing, image_generation, skill_mcp_dependency_install, steer, guardian_approval, goals, collaboration_modes, tool_call_mcp_elicitation, personality, fast_mode, tui_app_server, workspace_dependencies",
"feature flag overrides": "none",
"feature flags enabled": "27",
"log dir": "/home/gili/.codex/log",
"mcp servers": "1",
"model": "gpt-5.4",
"model provider": "openai",
"sqlite home": "/home/gili/.codex",
"startup warning": "Ignored unsupported project-local config keys in /mnt/c/Users/Gili/.codex/config.toml: notify. If you want these settings to apply, manually set them in your user-level config.toml.",
"startup warning MCP": "0",
"startup warning deprecated": "0",
"startup warning hooks": "0",
"startup warning plugins": "0",
"startup warning skills": "0",
"startup warnings": "1"
},
"remediation": null,
"durationMs": 0
},
"git.environment": {
"id": "git.environment",
"category": "git",
"status": "ok",
"summary": "git version 2.43.0",
"details": {
"PATH git #1": "/usr/bin/git",
"PATH git #2": "/bin/git",
"PATH git entries": "2",
"git build options": "git version 2.43.0; cpu: x86_64; no commit associated with this build; sizeof-long: 8; sizeof-size_t: 8; shell-path: /bin/sh",
"git exec path": "/usr/lib/git-core",
"git version": "git version 2.43.0",
"repo detected": "false",
"selected git": "/usr/bin/git"
},
"remediation": null,
"durationMs": 96
},
"installation": {
"id": "installation",
"category": "install",
"status": "ok",
"summary": "installation looks consistent",
"details": {
"PATH codex #1": "/home/gili/.local/bin/codex",
"PATH codex #2": "/home/gili/.local/bin/codex",
"PATH codex #3": "/mnt/c/Users/Gili/AppData/Local/pnpm/codex",
"PATH codex entries": "3",
"current executable": "/home/gili/.codex/packages/standalone/releases/0.139.0-x86_64-unknown-linux-musl/bin/codex",
"install context": "standalone (unix, package /home/gili/.codex/packages/standalone/releases/0.139.0-x86_64-unknown-linux-musl, bin /home/gili/.codex/packages/standalone/releases/0.139.0-x86_64-unknown-linux-musl/bin, resources /home/gili/.codex/packages/standalone/releases/0.139.0-x86_64-unknown-linux-musl/codex-resources, path /home/gili/.codex/packages/standalone/releases/0.139.0-x86_64-unknown-linux-musl/codex-path)",
"managed by bun": "false",
"managed by npm": "false",
"managed package root": "not set"
},
"remediation": null,
"durationMs": 69
},
"mcp.config": {
"id": "mcp.config",
"category": "mcp",
"status": "warning",
"summary": "MCP configuration has optional issues",
"details": {
"configured servers": "1",
"disabled servers": "0",
"node_repl": "stdio command \"C:\\\\Users\\\\Gili\\\\AppData\\\\Local\\\\OpenAI\\\\Codex\\\\runtimes\\\\cua_node\\\\789504f803e82e2b\\\\bin\\\\node_repl.exe\" is not resolvable (not found on PATH)",
"stdio servers": "1"
},
"remediation": "Set the missing MCP env vars or disable the affected server.",
"durationMs": 63
},
"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": {
"ChatGPT base URL": "https://chatgpt.com/backend-api/ reachable (HTTP 404)",
"reachability mode": "ChatGPT auth"
},
"remediation": null,
"durationMs": 178
},
"network.websocket_reachability": {
"id": "network.websocket_reachability",
"category": "websocket",
"status": "ok",
"summary": "Responses WebSocket handshake succeeded",
"details": {
"DNS": "2 IPv4, 2 IPv6, first IPv4",
"auth mode": "chatgpt",
"connect timeout": "15000 ms",
"endpoint": "wss://chatgpt.com/backend-api/<redacted>",
"handshake result": "HTTP 101 Switching Protocols",
"model provider": "openai",
"models etag present": "true",
"provider name": "OpenAI",
"proxy env vars": "none",
"reasoning header": "false",
"server model present": "false",
"supports websockets": "true",
"wire API": "responses"
},
"remediation": null,
"durationMs": 912
},
"runtime.provenance": {
"id": "runtime.provenance",
"category": "runtime",
"status": "ok",
"summary": "running standalone on linux-x86_64",
"details": {
"commit": "unknown",
"current executable": "/home/gili/.codex/packages/standalone/releases/0.139.0-x86_64-unknown-linux-musl/bin/codex",
"install method": "standalone (unix, package /home/gili/.codex/packages/standalone/releases/0.139.0-x86_64-unknown-linux-musl, bin /home/gili/.codex/packages/standalone/releases/0.139.0-x86_64-unknown-linux-musl/bin, resources /home/gili/.codex/packages/standalone/releases/0.139.0-x86_64-unknown-linux-musl/codex-resources, path /home/gili/.codex/packages/standalone/releases/0.139.0-x86_64-unknown-linux-musl/codex-path)",
"platform": "linux-x86_64",
"version": "0.139.0"
},
"remediation": null,
"durationMs": 0
},
"runtime.search": {
"id": "runtime.search",
"category": "search",
"status": "ok",
"summary": "search is OK (bundled)",
"details": {
"search command": "/home/gili/.codex/packages/standalone/releases/0.139.0-x86_64-unknown-linux-musl/codex-path/rg",
"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": "/home/gili/.codex/tmp/arg0/codex-arg0bzqWLE/codex-linux-sandbox",
"execve wrapper helper": "/home/gili/.codex/tmp/arg0/codex-arg0bzqWLE/codex-execve-wrapper",
"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": "/home/gili/.codex (dir)",
"active rollout files": "14 files, 38714759 total bytes, 2765339 average bytes",
"archived rollout files": "0 files, 0 total bytes, 0 average bytes",
"goals DB": "/home/gili/.codex/goals_1.sqlite (file)",
"goals DB integrity": "ok",
"log DB": "/home/gili/.codex/logs_2.sqlite (file)",
"log DB integrity": "ok",
"log dir": "/home/gili/.codex/log (dir)",
"memories DB": "/home/gili/.codex/memories_1.sqlite (file)",
"memories DB integrity": "ok",
"sqlite home": "/home/gili/.codex (dir)",
"standalone release cache": "3 entries in /home/gili/.codex/packages/standalone/releases",
"state DB": "/home/gili/.codex/state_5.sqlite (file)",
"state DB integrity": "ok"
},
"remediation": null,
"durationMs": 528
},
"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": "14",
"rollout DB active rows": "14",
"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=14",
"rollout DB rows": "14",
"rollout DB scan cap reached": "false",
"rollout DB scan errors": "0",
"rollout DB sources": "cli=14",
"rollout DB stale rows": "0"
},
"remediation": null,
"durationMs": 773
},
"system.environment": {
"id": "system.environment",
"category": "system",
"status": "ok",
"summary": "OS language C",
"details": {
"EDITOR": "not set",
"LANG": "C.UTF-8",
"VISUAL": "not set",
"os": "Ubuntu 24.4.0 (noble) [64-bit]",
"os language": "C",
"os type": "Ubuntu",
"os version": "24.4.0"
},
"remediation": null,
"durationMs": 10
},
"terminal.env": {
"id": "terminal.env",
"category": "terminal",
"status": "ok",
"summary": "terminal metadata was detected",
"details": {
"COLORTERM": "truecolor",
"DISPLAY": "present",
"WAYLAND_DISPLAY": "present",
"WSL_DISTRO_NAME": "present",
"WSL_INTEROP": "present",
"WT_SESSION": "present",
"color output": "enabled",
"effective locale": "C.UTF-8",
"stderr is terminal": "true",
"stdin is terminal": "true",
"stdout is terminal": "true",
"terminal": "Windows Terminal",
"terminal size": "252x67"
},
"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": "project config",
"terminal title project value": "Gili",
"terminal title source": "default"
},
"remediation": null,
"durationMs": 1
},
"updates.status": {
"id": "updates.status",
"category": "updates",
"status": "ok",
"summary": "update configuration is locally consistent",
"details": {
"cached latest version": "0.139.0",
"check for update on startup": "true",
"last checked at": "2026-06-11T17:45:17.425147927Z",
"latest version": "0.140.0",
"latest version status": "newer version is available",
"update action": "standalone installer",
"version cache": "/home/gili/.codex/version.json"
},
"remediation": null,
"durationMs": 379
}
}
}
What issue are you seeing?
An ongoing request halted mid-operation with:
■ Error running remote compact task: Fatal error: remote compaction v2 expected exactly one compaction output item, got 0 from 0 output items
What steps can reproduce the bug?
Uploaded thread: 019ed182-17e1-71f0-b719-d419ffe588dd
What is the expected behavior?
_No response_
Additional information
_No response_
8 Comments
Also, it seems to be be unable to recover from it... running
/compactelicits the error, and doing anything else causes it to try and compact, resulting in the error.Same I'm also getting this error constantly. Even on new sessions and such. Really annoying. I'm on 5.5 xhigh 1.40. also wsl
Even if it works after this, It totally forgets what it was doing, Compact is obviously failing.
Its an bug in 0.141.0. Rollback to before that and you should be fine.
You can try 0.140.0, but definitely not an issue in 0.136.0.
Been using 0.136.0 for a while now, because the spawn with model got botched from 0.137.0 onwards, but seemed to be fixed in 0.140.0.
Got the compact error while testing 0.141.0, went back to 0.136.0 and all good.
I got the issue in 1.40. I rolled back to 1.39 and it works fine again
also happening to me. After a downgrade codex works fine again
Thanks for reporting this problem. Until recently, Codex used a separate endpoint and server-side logic for compaction. We recently switched to a more robust approach where the compaction logic is moved locally using the same endpoint as normal turns. This eliminates "remote compaction" errors and increases the stability and reliability of compaction operations. If you see further problems with compaction, please use
/feedbackand open a new bug report.yay I can update to the latest version now! Thank you ser!