Skip to main content
Watch: I Built an AI App Without Leaving Databricks

OpenAI Codex CLI error

Codex CLI: Error running remote compact task: stream disconnected before...

Error message
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

  1. 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 errors

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.