What version of the Codex App are you using (From “About Codex” dialog)?
26.406.31014
What subscription do you have?
Pro
What platform is your computer?
No response
What issue are you seeing?
Summary
Codex for macOS intermittently fails when attempting remote compaction of a long thread. The visible error is:
Error running remote compact task: stream disconnected before completion: error sending request for url (https://chatgpt.com/backend-api/codex/responses/compact)
This appears to happen during thread compaction near the context limit, not during ordinary local tool execution.
Environment
- Codex app:
26.406.31014
- Bundled Codex CLI:
0.119.0-alpha.11
- Auth mode:
ChatGPT
- Model observed:
gpt-5.4
- Platform: macOS
- Observed: April 9-10, 2026
Frequency
Observed at least 7 times in local logs during the above window.
Expected behavior
When a thread needs compaction, Codex should either:
- complete compaction successfully, or
- fail gracefully with a retry/recovery path that preserves usability
Actual behavior
Compaction fails with:
stream disconnected before completion: error sending request for url (https://chatgpt.com/backend-api/codex/responses/compact)
This interrupts the thread and forces the user to start over or move to a new thread.
Reproduction pattern
Not fully deterministic, but correlated with:
- long-running threads
- large accumulated tool output and/or long conversation history
- automatic remote compaction near the context window
This does not appear to be caused by local repo code, shell commands, or a project-specific setup issue.
Sanitized evidence
Example sanitized log lines:
remote compaction failed ... last_api_response_total_tokens=230780 ... all_history_items_model_visible_bytes=893315 ... model_context_window_tokens=258400 ... failing_compaction_request_model_visible_bytes=908574 ... compact_error=stream disconnected before completion: error sending request for url (https://chatgpt.com/backend-api/codex/responses/compact)
remote compaction failed ... last_api_response_total_tokens=234880 ... all_history_items_model_visible_bytes=958429 ... model_context_window_tokens=258400 ... failing_compaction_request_model_visible_bytes=973688 ... compact_error=stream disconnected before completion: error sending request for url (https://chatgpt.com/backend-api/codex/responses/compact)
Notes
- I observed at least one successful compact-related flow in a separate thread, so this looks intermittent rather than a permanent configuration issue.
- The failure seems specific to the remote compaction request path.
- All account IDs, thread IDs, session IDs, absolute paths, repository URLs, and raw transcripts have been removed.
What steps can reproduce the bug?
Uploaded thread: 019d79a8-88cf-7b32-a79d-97e9d303ea2d
What is the expected behavior?
No response
Additional information
No response
What version of the Codex App are you using (From “About Codex” dialog)?
26.406.31014
What subscription do you have?
Pro
What platform is your computer?
No response
What issue are you seeing?
Summary
Codex for macOS intermittently fails when attempting remote compaction of a long thread. The visible error is:
Error running remote compact task: stream disconnected before completion: error sending request for url (https://chatgpt.com/backend-api/codex/responses/compact)This appears to happen during thread compaction near the context limit, not during ordinary local tool execution.
Environment
26.406.310140.119.0-alpha.11ChatGPTgpt-5.4Frequency
Observed at least 7 times in local logs during the above window.
Expected behavior
When a thread needs compaction, Codex should either:
Actual behavior
Compaction fails with:
stream disconnected before completion: error sending request for url (https://chatgpt.com/backend-api/codex/responses/compact)This interrupts the thread and forces the user to start over or move to a new thread.
Reproduction pattern
Not fully deterministic, but correlated with:
This does not appear to be caused by local repo code, shell commands, or a project-specific setup issue.
Sanitized evidence
Example sanitized log lines:
remote compaction failed ... last_api_response_total_tokens=230780 ... all_history_items_model_visible_bytes=893315 ... model_context_window_tokens=258400 ... failing_compaction_request_model_visible_bytes=908574 ... compact_error=stream disconnected before completion: error sending request for url (https://chatgpt.com/backend-api/codex/responses/compact)remote compaction failed ... last_api_response_total_tokens=234880 ... all_history_items_model_visible_bytes=958429 ... model_context_window_tokens=258400 ... failing_compaction_request_model_visible_bytes=973688 ... compact_error=stream disconnected before completion: error sending request for url (https://chatgpt.com/backend-api/codex/responses/compact)Notes
What steps can reproduce the bug?
Uploaded thread: 019d79a8-88cf-7b32-a79d-97e9d303ea2d
What is the expected behavior?
No response
Additional information
No response