Codex gets stuck after "Error running remote compact task: stream disconnected before completion"
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
- Open Codex in a project directory.
- Ask Codex to inspect or modify project files.
- After running for a while, Codex tries to compact the conversation/context.
- It fails with the error above.
- 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?
- Open Codex in a project directory.
- Ask Codex to inspect or modify project files.
- After running for a while, Codex tries to compact the conversation/context.
- It fails with the error above.
- Codex becomes stuck and no longer responds.
What is the expected behavior?
_No response_
Additional information
_No response_
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗