Skip to content

VScode插件Codex在wsl中Ubuntu系统超时:Reconnecting,stream disconnected before completion: error sending request for url (https://chatgpt. #8814

@xiaohonghua661

Description

@xiaohonghua661

What version of Codex is running?

codex-cli 0.77.0

What subscription do you have?

Plus

Which model were you using?

gpt-4.2

What platform is your computer?

Windows系统中的wslUbuntu20.04中的vscode插件Codex

What issue are you seeing?

2026-01-07 16:54:08.510 [warning] [warn] is production release true warning false
2026-01-07 16:54:12.914 [error] Error fetching https://ab.chatgpt.com/v1/initialize?k=client-sYWqzCYMRkUg4DqqiZcR5DGTNl2iD7zNJY0HoeDLzxR&st=javascript-client&sv=3.27.0&t=1767776050766&sid=1ad383c1-b06a-4503-8ed2-f1b8bedee5c2&se=1: TypeError: fetch failed
2026-01-07 16:54:12.932 [error] Error fetching /wham/accounts/check: TypeError: fetch failed
2026-01-07 16:54:13.014 [error] Error fetching https://ab.chatgpt.com/v1/initialize?k=client-sYWqzCYMRkUg4DqqiZcR5DGTNl2iD7zNJY0HoeDLzxR&st=javascript-client&sv=3.27.0&t=1767776050554&sid=1ad383c1-b06a-4503-8ed2-f1b8bedee5c2&se=1: TypeError: fetch failed
2026-01-07 16:54:13.126 [error] Error fetching https://ab.chatgpt.com/v1/initialize?k=client-sYWqzCYMRkUg4DqqiZcR5DGTNl2iD7zNJY0HoeDLzxR&st=javascript-client&sv=3.27.0&t=1767776050551&sid=1ad383c1-b06a-4503-8ed2-f1b8bedee5c2&se=1: TypeError: fetch failed
2026-01-07 16:54:15.058 [error] Error fetching /wham/tasks/list?limit=20&task_filter=current: TypeError: fetch failed
2026-01-07 16:54:15.289 [error] Error fetching /wham/accounts/check: TypeError: fetch failed
2026-01-07 16:54:15.417 [error] Error fetching /wham/environments: TypeError: fetch failed
2026-01-07 16:54:15.519 [error] Error fetching /wham/usage: TypeError: fetch failed
2026-01-07 16:54:18.060 [error] [CodexMcpConnection] CLI: codex_api::endpoint::responses: error=network error: error sending request for url (https://chatgpt.com/backend-api/codex/responses)
2026-01-07 16:54:18.060 [warning] [CodexMcpConnection] CLI: codex_core::codex: stream disconnected - retrying turn (1/5 in 207ms)...
2026-01-07 16:54:21.249 [error] [CodexMcpConnection] CLI: codex_api::endpoint::responses: error=network error: error sending request for url (https://chatgpt.com/backend-api/codex/responses)
2026-01-07 16:54:21.250 [warning] [CodexMcpConnection] CLI: codex_core::codex: stream disconnected - retrying turn (2/5 in 419ms)...
2026-01-07 16:54:22.618 [error] Error fetching https://ab.chatgpt.com/v1/rgstr?k=client-sYWqzCYMRkUg4DqqiZcR5DGTNl2iD7zNJY0HoeDLzxR&st=javascript-client-react&sv=3.27.0&t=1767776060553&sid=1ad383c1-b06a-4503-8ed2-f1b8bedee5c2&ec=13&gz=1: TypeError: fetch failed
2026-01-07 16:54:24.961 [error] [CodexMcpConnection] CLI: codex_api::endpoint::responses: error=network error: error sending request for url (https://chatgpt.com/backend-api/codex/responses)
2026-01-07 16:54:24.961 [warning] [CodexMcpConnection] CLI: codex_core::codex: stream disconnected - retrying turn (3/5 in 817ms)...
2026-01-07 16:54:28.847 [error] [CodexMcpConnection] CLI: codex_api::endpoint::responses: error=network error: error sending request for url (https://chatgpt.com/backend-api/codex/responses)
2026-01-07 16:54:28.847 [warning] [CodexMcpConnection] CLI: codex_core::codex: stream disconnected - retrying turn (4/5 in 1.642s)...
2026-01-07 16:54:33.568 [error] [CodexMcpConnection] CLI: codex_api::endpoint::responses: error=network error: error sending request for url (https://chatgpt.com/backend-api/codex/responses)
2026-01-07 16:54:33.569 [warning] [CodexMcpConnection] CLI: codex_core::codex: stream disconnected - retrying turn (5/5 in 2.926s)...
2026-01-07 16:54:39.548 [error] [CodexMcpConnection] CLI: codex_api::endpoint::responses: error=network error: error sending request for url (https://chatgpt.com/backend-api/codex/responses)

What steps can reproduce the bug?

2026-01-07 16:54:08.510 [warning] [warn] is production release true warning false
2026-01-07 16:54:12.914 [error] Error fetching https://ab.chatgpt.com/v1/initialize?k=client-sYWqzCYMRkUg4DqqiZcR5DGTNl2iD7zNJY0HoeDLzxR&st=javascript-client&sv=3.27.0&t=1767776050766&sid=1ad383c1-b06a-4503-8ed2-f1b8bedee5c2&se=1: TypeError: fetch failed
2026-01-07 16:54:12.932 [error] Error fetching /wham/accounts/check: TypeError: fetch failed
2026-01-07 16:54:13.014 [error] Error fetching https://ab.chatgpt.com/v1/initialize?k=client-sYWqzCYMRkUg4DqqiZcR5DGTNl2iD7zNJY0HoeDLzxR&st=javascript-client&sv=3.27.0&t=1767776050554&sid=1ad383c1-b06a-4503-8ed2-f1b8bedee5c2&se=1: TypeError: fetch failed
2026-01-07 16:54:13.126 [error] Error fetching https://ab.chatgpt.com/v1/initialize?k=client-sYWqzCYMRkUg4DqqiZcR5DGTNl2iD7zNJY0HoeDLzxR&st=javascript-client&sv=3.27.0&t=1767776050551&sid=1ad383c1-b06a-4503-8ed2-f1b8bedee5c2&se=1: TypeError: fetch failed
2026-01-07 16:54:15.058 [error] Error fetching /wham/tasks/list?limit=20&task_filter=current: TypeError: fetch failed
2026-01-07 16:54:15.289 [error] Error fetching /wham/accounts/check: TypeError: fetch failed
2026-01-07 16:54:15.417 [error] Error fetching /wham/environments: TypeError: fetch failed
2026-01-07 16:54:15.519 [error] Error fetching /wham/usage: TypeError: fetch failed
2026-01-07 16:54:18.060 [error] [CodexMcpConnection] CLI: codex_api::endpoint::responses: error=network error: error sending request for url (https://chatgpt.com/backend-api/codex/responses)
2026-01-07 16:54:18.060 [warning] [CodexMcpConnection] CLI: codex_core::codex: stream disconnected - retrying turn (1/5 in 207ms)...
2026-01-07 16:54:21.249 [error] [CodexMcpConnection] CLI: codex_api::endpoint::responses: error=network error: error sending request for url (https://chatgpt.com/backend-api/codex/responses)
2026-01-07 16:54:21.250 [warning] [CodexMcpConnection] CLI: codex_core::codex: stream disconnected - retrying turn (2/5 in 419ms)...
2026-01-07 16:54:22.618 [error] Error fetching https://ab.chatgpt.com/v1/rgstr?k=client-sYWqzCYMRkUg4DqqiZcR5DGTNl2iD7zNJY0HoeDLzxR&st=javascript-client-react&sv=3.27.0&t=1767776060553&sid=1ad383c1-b06a-4503-8ed2-f1b8bedee5c2&ec=13&gz=1: TypeError: fetch failed
2026-01-07 16:54:24.961 [error] [CodexMcpConnection] CLI: codex_api::endpoint::responses: error=network error: error sending request for url (https://chatgpt.com/backend-api/codex/responses)
2026-01-07 16:54:24.961 [warning] [CodexMcpConnection] CLI: codex_core::codex: stream disconnected - retrying turn (3/5 in 817ms)...
2026-01-07 16:54:28.847 [error] [CodexMcpConnection] CLI: codex_api::endpoint::responses: error=network error: error sending request for url (https://chatgpt.com/backend-api/codex/responses)
2026-01-07 16:54:28.847 [warning] [CodexMcpConnection] CLI: codex_core::codex: stream disconnected - retrying turn (4/5 in 1.642s)...
2026-01-07 16:54:33.568 [error] [CodexMcpConnection] CLI: codex_api::endpoint::responses: error=network error: error sending request for url (https://chatgpt.com/backend-api/codex/responses)
2026-01-07 16:54:33.569 [warning] [CodexMcpConnection] CLI: codex_core::codex: stream disconnected - retrying turn (5/5 in 2.926s)...
2026-01-07 16:54:39.548 [error] [CodexMcpConnection] CLI: codex_api::endpoint::responses: error=network error: error sending request for url (https://chatgpt.com/backend-api/codex/responses)
2026-01-07 16:55:23.442 [error] Error fetching https://ab.chatgpt.com/v1/rgstr?k=client-sYWqzCYMRkUg4DqqiZcR5DGTNl2iD7zNJY0HoeDLzxR&st=javascript-client-react&sv=3.27.0&t=1767776121335&sid=1ad383c1-b06a-4503-8ed2-f1b8bedee5c2&ec=13&gz=1: TypeError: fetch failed

What is the expected behavior?

No response

Additional information

参考
#7623
问题如下
Reconnecting... 1/5
Reconnecting... 2/5
Reconnecting... 3/5
Reconnecting... 4/5
Reconnecting... 5/5
stream disconnected before completion: error sending request for url (https://chatgpt.com/backend-api/codex/responses)
解决办法
在 vscode 设置中搜索 http.proxy,然后输入你的代理地址:http://192.168.0.253:7890/
补充:这个代理是 vscode 全局的,若影响到了你的正常使用,需要回到这里进行删除

Image

代理地址是如何来的
Clash for Windows 中有一个允许局域网其他设备代理到这台主机上,所以将我的 Windows 主机作为了代理服务器,我的主机外网卡 IP 是这个,使用 ipconfig进行查看,每个电脑使用的外网卡是不一样的,我这里是使用的网线,如果你是 WiFi 可以会不一样的

Image

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingextensionIssues related to the VS Code extensionwindows-osIssues related to Codex on Windows systems

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions