Codex gets stuck after "Error running remote compact task: stream disconnected before completion"

Resolved 💬 4 comments Opened May 12, 2026 by 3022244459 Closed Jun 29, 2026

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_

View original on GitHub ↗

This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗