codex - 💡(How to fix) Fix Windows desktop app intermittently fails streamed responses behind Clash Verge Rev proxy (TLS EOF / response body decode error)

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Error Message

  • stream disconnected before completion: IO error: peer closed connection without sending TLS close_notify
  • stream disconnected before completion: Transport error: network error: error decoding response body stream disconnected before completion: IO error: peer closed connection without sending TLS close_notify stream disconnected before completion: Transport error: network error: error decoding response body
RAW_BUFFERClick to expand / collapse

What version of the Codex App are you using (From “About Codex” dialog)?

26.415.4716.0

What subscription do you have?

plus

What platform is your computer?

No response

What issue are you seeing?

On Windows desktop, Codex intermittently fails during streamed replies when running behind Clash Verge Rev.

This is not a total connectivity failure. The app can still partially continue working and produce output, but the same session, or a newly opened window/session, may show repeated reconnects or fail before the streamed response completes.

I observed multiple failure modes during the same general setup:

  • stream disconnected before completion: IO error: peer closed connection without sending TLS close_notify
  • stream disconnected before completion: tls handshake eof
  • stream disconnected before completion: Transport error: network error: error decoding response body

In some cases, one window/session can still work while another newly opened window/session shows reconnects or stream completion failures.

What steps can reproduce the bug?

Steps to reproduce

  1. Run the Codex Windows desktop app.
  2. Use Clash Verge Rev as the local proxy.
  3. Verify the active local proxy port is 127.0.0.1:7897 (mixed-port).
  4. Launch Codex with explicit proxy environment variables:
    • HTTP_PROXY=http://127.0.0.1:7897
    • HTTPS_PROXY=http://127.0.0.1:7897
    • ALL_PROXY=socks5://127.0.0.1:7897
  5. Start a normal chat, especially one that triggers web searches or a longer streamed response.
  6. Open a new window/session and repeat.
  7. Observe intermittent reconnects and stream completion failures.

What is the expected behavior?

Expected behavior

Codex should stream the full response normally without repeated reconnects or stream completion failures.

Actual behavior

The desktop app intermittently reconnects or fails before the stream completes.

Examples shown in the UI include:

Reconnecting... 2/5
stream disconnected before completion: IO error: peer closed connection without sending TLS close_notify

Reconnecting... 3/5
stream disconnected before completion: tls handshake eof

stream disconnected before completion: Transport error: network error: error decoding response body

### Additional information

_No response_

extent analysis

TL;DR

The issue can be mitigated by adjusting the proxy settings or environment variables to ensure stable connectivity between the Codex app and the Clash Verge Rev proxy.

Guidance

  • Verify that the Clash Verge Rev proxy is properly configured and running on the specified port (127.0.0.1:7897) to rule out any issues with the proxy itself.
  • Check the Codex app's proxy environment variables (HTTP_PROXY, HTTPS_PROXY, ALL_PROXY) to ensure they are correctly set and consistent, as inconsistencies might lead to intermittent connectivity issues.
  • Consider testing the Codex app without the proxy or with a different proxy setup to isolate if the issue is specific to the Clash Verge Rev configuration.
  • Review the system's network settings and firewall rules to ensure they are not interfering with the connection between the Codex app and the proxy.

Example

No specific code snippet can be provided without more details on the Codex app's internal workings or the exact proxy configuration. However, ensuring the environment variables are set correctly, such as:

HTTP_PROXY=http://127.0.0.1:7897
HTTPS_PROXY=http://127.0.0.1:7897
ALL_PROXY=socks5://127.0.0.1:7897

might help in stabilizing the connection.

Notes

The issue seems to be related to the interaction between the Codex app and the Clash Verge Rev proxy. Without more specific details about the network setup or the app's handling of proxy connections, it's challenging to provide a definitive solution. The suggestions are aimed at troubleshooting and potentially mitigating the symptoms.

Recommendation

Apply workaround: Adjusting the proxy settings or environment variables as suggested might help in reducing the occurrences of the issue, although it may not completely resolve the problem. This approach is recommended because it directly addresses the potential cause of the intermittent connectivity issues without requiring significant changes to the system or the app.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

Expected behavior

Codex should stream the full response normally without repeated reconnects or stream completion failures.

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

codex - 💡(How to fix) Fix Windows desktop app intermittently fails streamed responses behind Clash Verge Rev proxy (TLS EOF / response body decode error)