You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
/compact and auto-compact fail with "stream disconnected before completion" since April 15, 2026 #18838
/compact
compact starts normally
after about 3-10 minutes, the task fails
the turn completes without any compacted result
repeated attempts behave the same way
What is the expected behavior?
/compact and auto-compact should complete successfully and return a compacted conversation/context.
Additional information
Since April 15, 2026, compacting stopped working in Codex CLI.
The issue happens in both cases:
when /compact is triggered manually
when compact is triggered automatically by the model
Every retry ends with the exact same error:
Error running remote compact task: stream disconnected before completion: error sending request for url (https://chatgpt.com/backend-api/codex/responses/compact)
This looks reproducible and not random.
Relevant logs
{"timestamp":"2026-04-21T13:03:03.024Z","type":"event_msg","payload":{"type":"task_started","turn_id":"019db023-176e-7c20-b0f2-e06dd50450eb","started_at":1776776583,"model_context_window":258400,"collaboration_mode_kind":"default"}}
{"timestamp":"2026-04-21T13:13:03.358Z","type":"event_msg","payload":{"type":"error","message":"Error running remote compact task: stream disconnected before completion: error sending request for url (https://chatgpt.com/backend-api/codex/responses/compact)","codex_error_info":"other"}}
{"timestamp":"2026-04-21T13:13:03.359Z","type":"event_msg","payload":{"type":"task_complete","turn_id":"019db023-176e-7c20-b0f2-e06dd50450eb","last_agent_message":null,"completed_at":1776777183,"duration_ms":600334}}}
Activity
github-actions commentedon Apr 21, 2026
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
RossRichardson commentedon Apr 25, 2026
Close, Restart OS and Run. It should fix it: #19255 (comment)