openai / openai/codex

Codex Desktop on macOS: automatic context compaction fails every time with “error decoding response body”

Open
#38,969 7 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

app bug connectivity context
Dominant language
Rust
Stars
125k
Forks
19.5k
PR merge metrics
PR metrics pending

Description

Summary

In Codex Desktop on macOS, automatic context compaction consistently fails whenever it is triggered. The task runs normally before compaction, but once the UI enters Context automatically compacting, it reconnects and then reports a remote compact transport/decode failure.

This is not an isolated one-off failure: in my sessions, it happens every time context compaction is triggered, making long-running conversations unreliable and difficult to continue.

Error

Error running remote compact task: stream disconnected before completion: Transport error: network error: error decoding response body

The UI shows:

Context automatically compacting
Reconnecting 2/2

and then the error above.

Environment

  • Product: Codex Desktop
  • Platform: macOS
  • Subscription: ChatGPT Pro
  • Model shown in the affected session: GPT-5.6 Sol Ultra
  • App version: not visible in the captured screen; diagnostics were submitted from the affected session

Steps to reproduce

  1. Open or continue a long-running Codex Desktop conversation.
  2. Let Codex work normally until automatic context compaction is triggered.
  3. Observe Context automatically compacting.
  4. The compact operation enters a reconnect cycle (Reconnecting 2/2).
  5. It fails with:
Error running remote compact task: stream disconnected before completion: Transport error: network error: error decoding response body
  1. Continue using other sessions until compaction is triggered; the same failure recurs.

Actual behavior

  • The remote compact task disconnects before completion.
  • The response body cannot be decoded.
  • The current task is interrupted during compaction.
  • Long-running conversations become unreliable because the failure occurs at the exact point where compaction is required to continue safely.

Expected behavior

  • Automatic compaction should complete successfully and preserve enough task state for the agent to continue.
  • A transient transport failure should retry robustly or use a safe fallback.
  • The thread should not become blocked or unreliable merely because it reached the compaction stage.

Diagnostics

Feedback was submitted from the affected session with diagnostics enabled.

Feedback ID: 01a00ebf-d399-7373-975c-c359138dd909

Related reports

Similar symptoms appear in #31375, #32545, #38434, and #38861. This report adds a current macOS Codex Desktop reproduction using GPT-5.6 Sol Ultra, with a fresh Feedback ID tied to the affected session and the observation that the failure occurs every time automatic compaction is triggered.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the submitted diagnostics for Feedback ID 01a00ebf-d399-7373-975c-c359138dd909 and compare the related reports #31375, #32545, #38434, and #38861. Reproduce automatic compaction in Codex Desktop on macOS and trace the remote compact transport failure; done means compaction completes or safely retries without blocking the conversation.

Written by the indexing model from the issue text.

Assessment

Tech stack
macos, rust
Domain
desktop, networking
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Needs clarification
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.