~/wiki / novosti / codex-error-remote-compact-task-stream-disconnected-2026

Error running remote compact task: stream disconnected before completion

◷ 3 min read 6/2/2026

Main chat

A chat for vibe coders: news, guides, live cases, marketplace, and finding executors.

$ cd section/ $ join vibe dev
Error running remote compact task: stream disconnected before completion - обложка

If you’re actively working on Codex (app, CLI, or integration), you’ve probably encountered this error before:

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

In May-June 2026, this problem became widespread. It is especially common in users of GPT-5.5 with automatic or manual context compression (/compact).

Why does this mistake occur

The main reasons (according to user reports on GitHub, Reddit and OpenAI forums):

  1. Problem with GPT-5.5 OpenAI doesn’t seem to have full remote compaction support for the new 5.5. When the context approaches the limit (usually 200-250k+ tokens), the compression attempt drops.

  2. Timeouts and streaming shutdowns The request for /compact takes too long and the connection is terminated.

  3. Network problems and providers VPNs, corporate networks, Zscaler, unstable Internet or problems with TLS certificates.

  4. Bugs in specific versions Often found in Codex Desktop (Mac/Windows) and CLI after updates.

Working decisions (from the most effective)

The most reliable method (works for 80-90% of users):

  1. Switch to GPT-5.4 Mini (or 5.3 Mini).
  2. Write a simple message to chat, for example: Сожми контекст or /compact.
  3. Wait for a successful compression.
  4. Switch back to GPT-5.5.

After that, the session is usually stabilized.

** Other verified fixes:**

  • Increase timeout in Codex configuration (~/.codex/config.toml or similar file):

    toml
    stream_idle_timeout_ms = 900000   # 15 минут
  • Add to the config

    toml
    model_auto_compact_token_limit = 192000

This forces you to compress the context earlier when there is still enough space.

  • **Create a new chat, sometimes it helps radically.
  • Update Codex to the latest version.
  • Disable the VPN/corporate proxy during operation.
  • For Windows: Update system root certificates.

Comparison of decisions

Решение Сложность Эффективность Когда использовать
Смена модели + compaction Низкая ★★★★★ Самый частый случай
Увеличение timeout в config Средняя ★★★★ Повторяющиеся обрывы
Новый чат Низкая ★★★ Быстрый, но временный фикс
Обновление + очистка кэша Средняя ★★★ После обновлений Codex

What to do next to make the problem less worrying

  • Regularly compress the context manually, without waiting for an automatic trigger.
  • Use several models: 5.5 for complex tasks, 5.4 Mini for long sessions.
  • Go to LiteLLM or local/alternative providers if Codex continues to fail.
  • Keep an eye out for OpenAI updates - the bug has been known for a long time and is gradually fixed.

Conclusion

The stream disconnected before completion error in the context of remote compact is one of the most annoying Codex issues of 2026. Fortunately, it does a good job of changing the model while the context is compressed.

$ cd ../ ← back to News