codex - 💡(How to fix) Fix Codex gets stuck after "Error running remote compact task: stream disconnected before completion"

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Codex frequently gets stuck during normal use. The terminal shows:

Error running remote compact task: stream disconnected before completion: error sending request for url (https://chatgpt.com/backend-api/codex/responses/compact)

After this happens, Codex stops responding. Sending more messages does not work, and I have to terminate the session and start a new one.

Error Message

[paste full terminal log here]

Root Cause

Codex frequently gets stuck during normal use. The terminal shows:

Error running remote compact task: stream disconnected before completion: error sending request for url (https://chatgpt.com/backend-api/codex/responses/compact)

After this happens, Codex stops responding. Sending more messages does not work, and I have to terminate the session and start a new one.

RAW_BUFFERClick to expand / collapse

What version of Codex CLI is running?

v0.130.0

What subscription do you have?

Codex frequently gets stuck during normal use. The terminal shows: Error running remote compact task: stream disconnected before completion: error sending request for url (https://chatgpt.com/backend-api/codex/responses/compact) After this happens, Codex stops responding. Sending more messages does not work, and I have to terminate the session and start a new one.

Which model were you using?

gpt-5.5

What platform is your computer?

windowsx86

What terminal emulator and version are you using (if applicable)?

No response

What issue are you seeing?

Description

Codex frequently gets stuck during normal use. The terminal shows:

Error running remote compact task: stream disconnected before completion: error sending request for url (https://chatgpt.com/backend-api/codex/responses/compact)

After this happens, Codex stops responding. Sending more messages does not work, and I have to terminate the session and start a new one.

Environment

  • OS: Windows 10 / Windows 11
  • Shell: PowerShell
  • Codex version: [paste output of codex --version]
  • Installation method: npm / other
  • Project type: Node.js / Electron / Egg.js backend
  • Project path example: D:\cashier\backend or D:\cashier\desktop

Steps to reproduce

  1. Open Codex in a project directory.
  2. Ask Codex to inspect or modify project files.
  3. After running for a while, Codex tries to compact the conversation/context.
  4. It fails with the error above.
  5. Codex becomes stuck and no longer responds.

Expected behavior

Codex should recover from the failed compact request or retry automatically.

Actual behavior

Codex becomes stuck and requires restarting the session.

Logs

[paste full terminal log here]

Additional context

This happens repeatedly, especially in larger Node/Electron projects. I have already tried restarting the session and reducing the scope of prompts.

What steps can reproduce the bug?

  1. Open Codex in a project directory.
  2. Ask Codex to inspect or modify project files.
  3. After running for a while, Codex tries to compact the conversation/context.
  4. It fails with the error above.
  5. Codex becomes stuck and no longer responds.

What is the expected behavior?

No response

Additional information

No response

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

Expected behavior

Codex should recover from the failed compact request or retry automatically.

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

codex - 💡(How to fix) Fix Codex gets stuck after "Error running remote compact task: stream disconnected before completion"