OpenAI Codex CLI error
Codex CLI: Error running remote compact task: stream disconnected before...
Error running remote compact task: stream disconnected before completion: error sending request for url (https://chatgpt.com/backend-api/codex/responses/compact)Status: Fixed in releaseLast verified 1 documented fix2 sources
What it means
Automatic or manual compaction of a long thread failed while calling the separate remote compaction endpoint. Reporters said the session became unusable afterwards.
Causes
- Maintainer etraut-openai (2026-06-29): until recently Codex used a separate endpoint and server-side logic for compaction, which produced these "remote compaction" errors.
How to fix it
- Fix 1.
Update Codex. Maintainers said they switched to a more robust approach where compaction logic is moved locally using the same endpoint as normal turns, which eliminates "remote compaction" errors. If compaction still fails, run /feedback and open a new bug report.
Slash command/feedback
More Codex CLI errors
All 14 Codex CLI errorsstream disconnected before completion: stream closed before response.completedStatus: Workaroundstream disconnected before completion: error sending request for url (https://chatgpt.com/backend-api/codex/responses)Status: OpenSelected model is at capacity. Please try a different model.Status: By designYour access token could not be refreshed because your refresh token was already used. Please log out and sign in again.Status: Fixed in releaseCodex ran out of room in the model's context window. Start a new thread or clear earlier history before retrying.Status: Fixed in releaseError logging in: Port 127.0.0.1:1455 is already in useStatus: WorkaroundToken exchange failed: token endpoint returned status 403 ForbiddenStatus: WorkaroundMCP client for `playwright` failed to start: program not foundStatus: Fixed in release
Related reading
- Agent-Manager: A Tmux TUI for Running Claude Code, Codex, and OpenCode Side by SideAgent-Manager wraps tmux into a Go TUI that groups AI coding agents by project, shows live status for each, and lets you answer blocked agents or review their changes without attaching to their terminal.
- Codex-Maxxing: How to Run Long-Running Codex Workflows Without Losing the PlotCodex-Maxxing done right is bounded autonomy: AGENTS.md, small worktrees, explicit stop conditions and review checkpoints for long-running Codex workflows.
- Claude Fable 5 Pricing: Real Cost Per Task vs Opus 4.8, GPT-5.5 and CodexClaude Fable 5 pricing beyond the $10/$50 per MTok list rate: real cost per task versus Opus 5, Opus 4.8 and Sonnet 5, and when the premium pays off.
- Codex CLI 0.163: Instant Steering Is Now the DefaultCodex CLI 0.163.0 makes mid-response steering the default and adds searchable /config and a leader key. What changed and what to check before upgrading.
- Codex 'gpt-5.5 Model Is Not Supported' Error: The FixCodex says gpt-5.5 is not supported with a ChatGPT account because OpenAI retired it from ChatGPT sign-in on October 14. The fix and what still works.
- Agent Harness Lessons From a 500B-Token Decompile: Give Agents a PASS/FAIL OracleAgent harness lessons from a 500B+ token decompile: a byte-matching PASS/FAIL oracle beat the reviewer agent. How agents cheated it and what to copy.
FAQ
What does "Error running remote compact task: stream disconnected before..." mean in Codex CLI?
Automatic or manual compaction of a long thread failed while calling the separate remote compaction endpoint. Reporters said the session became unusable afterwards.
How do I fix "Error running remote compact task: stream disconnected before..."?
Update Codex. Maintainers said they switched to a more robust approach where compaction logic is moved locally using the same endpoint as normal turns, which eliminates "remote compaction" errors. If compaction still fails, run /feedback and open a new bug report.
Is this Codex CLI error fixed?
Status: Fixed in release. A release fixed this. The affected versions note says where the fix landed. Affected versions: Reported on codex-cli 0.114.0 (#14559) and Codex app 26.406.31014 with bundled CLI 0.119.0-alpha.11 (#17392)
Sources
Last verified against 2 sources: official docs, maintainer replies and release notes.
Newsletter
Fixes for the tools you use, weekly
One email per week. New coding agent releases, what broke, and how developers are working around it.