openai / openai/codex

Remote compaction and long-running tasks consistently fail across Codex Desktop/Work, VS Code, and WSL CLI

Open
#38,434 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

What version of the Codex App are you using (From “About Codex” dialog)?

codex-cli 0.147.0-alpha.6.6

What subscription do you have?

pro

What platform is your computer?

windows 10

What issue are you seeing?

Summary

Codex consistently fails during both manual and automatic context compaction.

The same failure also occurs during moderately long-running tasks even when the context window is only around 20–30% utilized.

This reproduces across multiple Codex surfaces:

  • ChatGPT Work / Codex Desktop on Windows
  • Codex VS Code extension
  • Codex CLI running in WSL2
  • A second computer also reproduces the same problem

This does not appear to be limited to a single installation or a context-near-limit condition.

Error

The recurring error is:

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

Manual /compact and automatic compaction fail in the same way.

Important observation

The failure is not limited to sessions near the context limit.

I can reproduce similar failures during longer-running tasks when context usage is only approximately 20–30%.

Normal short interactions generally work.

Environment

Primary computer:

  • Windows 10
  • WSL2 Ubuntu 22.04
  • ChatGPT/Codex Desktop package:
    OpenAI.Codex 26.803.10989.0

Desktop-managed WSL Codex runtime:

  • codex-cli 0.147.0-alpha.6.6

Standalone WSL CLI:

  • codex-cli 0.147.0

Affected surfaces:

  1. ChatGPT Work / Codex Desktop
  2. VS Code Codex extension
  3. WSL Codex CLI

A second computer reproduces the same context-compaction failure as well.

Desktop runtime verification

The ChatGPT Desktop application launches its own WSL Codex app-server from:

/mnt/c/Users/Administrator/.codex/bin/wsl//codex

with:

codex -c features.code_mode_host=true app-server --analytics-default-enabled

The running Desktop-managed runtime reports:

codex-cli 0.147.0-alpha.6.6

Reproduction

Case 1: Manual compaction
  1. Open an existing Codex thread.
  2. Run /compact.
  3. Wait for remote compaction.
  4. It fails with:

stream disconnected before completion
Transport error: network error
error decoding response body

Case 2: Automatic compaction
  1. Continue using the thread until Codex triggers automatic compaction.
  2. Automatic compaction starts.
  3. The same remote compact failure occurs.
Case 3: Longer-running task with low context utilization
  1. Start a task with only approximately 20–30% context utilization.
  2. Allow Codex to perform a moderately long multi-step task.
  3. The task can still fail with the same stream/network decoding behavior.

This suggests that the problem may not be purely a context-window-threshold issue.

Expected behavior

  • Manual /compact should complete successfully.
  • Automatic compaction should complete or retry transparently.
  • Longer-running tasks should not fail merely because the response stream remains active for longer.
  • A failed compaction should have a recovery/fallback path rather than leaving the thread unusable.

Additional observations

  • Normal shorter Codex interactions generally work.
  • The issue reproduces on more than one computer.
  • Updating the standalone WSL Codex CLI to 0.147.0 did not resolve the problem.
  • ChatGPT Desktop uses its own bundled/managed WSL runtime rather than the standalone CLI.
  • The problem affects multiple Codex surfaces rather than one specific frontend.

Feedback ID

[PASTE /feedback ID HERE]

Approximate timestamps

[PASTE 2–3 recent failure timestamps, including timezone]

Subscription

[PASTE ACTUAL PLAN HERE]

What steps can reproduce the bug?

Summary

Codex consistently fails during both manual and automatic context compaction.

The same failure also occurs during moderately long-running tasks even when the context window is only around 20–30% utilized.

This reproduces across multiple Codex surfaces:

  • ChatGPT Work / Codex Desktop on Windows
  • Codex VS Code extension
  • Codex CLI running in WSL2
  • A second computer also reproduces the same problem

This does not appear to be limited to a single installation or a context-near-limit condition.

Error

The recurring error is:

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

Manual /compact and automatic compaction fail in the same way.

Important observation

The failure is not limited to sessions near the context limit.

I can reproduce similar failures during longer-running tasks when context usage is only approximately 20–30%.

Normal short interactions generally work.

Environment

Primary computer:

  • Windows 10
  • WSL2 Ubuntu 22.04
  • ChatGPT/Codex Desktop package:
    OpenAI.Codex 26.803.10989.0

Desktop-managed WSL Codex runtime:

  • codex-cli 0.147.0-alpha.6.6

Standalone WSL CLI:

  • codex-cli 0.147.0

Affected surfaces:

  1. ChatGPT Work / Codex Desktop
  2. VS Code Codex extension
  3. WSL Codex CLI

A second computer reproduces the same context-compaction failure as well.

Desktop runtime verification

The ChatGPT Desktop application launches its own WSL Codex app-server from:

/mnt/c/Users/Administrator/.codex/bin/wsl//codex

with:

codex -c features.code_mode_host=true app-server --analytics-default-enabled

The running Desktop-managed runtime reports:

codex-cli 0.147.0-alpha.6.6

Reproduction

Case 1: Manual compaction
  1. Open an existing Codex thread.
  2. Run /compact.
  3. Wait for remote compaction.
  4. It fails with:

stream disconnected before completion
Transport error: network error
error decoding response body

Case 2: Automatic compaction
  1. Continue using the thread until Codex triggers automatic compaction.
  2. Automatic compaction starts.
  3. The same remote compact failure occurs.
Case 3: Longer-running task with low context utilization
  1. Start a task with only approximately 20–30% context utilization.
  2. Allow Codex to perform a moderately long multi-step task.
  3. The task can still fail with the same stream/network decoding behavior.

This suggests that the problem may not be purely a context-window-threshold issue.

Expected behavior

  • Manual /compact should complete successfully.
  • Automatic compaction should complete or retry transparently.
  • Longer-running tasks should not fail merely because the response stream remains active for longer.
  • A failed compaction should have a recovery/fallback path rather than leaving the thread unusable.

Additional observations

  • Normal shorter Codex interactions generally work.
  • The issue reproduces on more than one computer.
  • Updating the standalone WSL Codex CLI to 0.147.0 did not resolve the problem.
  • ChatGPT Desktop uses its own bundled/managed WSL runtime rather than the standalone CLI.
  • The problem affects multiple Codex surfaces rather than one specific frontend.

Feedback ID

[PASTE /feedback ID HERE]

Approximate timestamps

[PASTE 2–3 recent failure timestamps, including timezone]

Subscription

[PASTE ACTUAL PLAN HERE]

What is the expected behavior?

No response

Additional information

No response

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 at the WSL app-server entry point shown in the issue and trace the remote compact task through its response stream and transport error handling. Reproduce manual /compact and a longer-running task across the listed Codex surfaces, then verify that compaction completes or recovers without stream-disconnection or response-decoding failures.

Written by the indexing model from the issue text.

Assessment

Tech stack
linux, rust, vscode
Domain
backend-api-design, cli, networking
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.