VS Code Remote-SSH: Codex extension stuck on “Thinking”
What version of the VS Code extension are you using?
0.4.0
Which IDE are you using?
VS Code
What platform is your computer?
ssh Linux and local windows
What steps can reproduce the bug?
Hi everyone—looking for help! I’m using VS Code to connect to a remote server over SSH. I also set up reverse port forwarding to my local proxy so the remote terminal can access the internet. From the terminal on the server, both Claude Code and Codex work fine.
However, after installing the Codex extension in VS Code, no matter what I type it just stays on “Thinking” and eventually throws:
error sending request for url (https://chatgpt.com/backend-api/codex/responses)
ChatGPT suggested adding this to settings.json:
"remote.extensionKind": { "openai.chatgpt": ["ui"] }
If I do that, the Codex panel can produce responses, but it can’t read any files on the server—every path is shown as C:/xxx, as if the extension is running locally instead of on the remote host.
How can I fix this so the extension works and can access files on the remote server? Any advice would be greatly appreciated!
What is the expected behavior?
_No response_
What do you see instead?
_No response_
Additional information
_No response_
27 Comments
same issue, different from the local running case is this:
<img width="2220" height="249" alt="Image" src="https://github.com/user-attachments/assets/4e93b507-60bc-4c01-8435-36fa8a2437d0" />
@FireFoxzzzz 试试终端跑吧,终端没问题,vscode里下载的codex不行,对于ssh远程连接的
同终端可以,codex插件不行。这个无法解决吗? @fouad-openai
I come across the same question, I can run the codex in the terminal but not in vsocde extensions.
请问一下您最终解决了这个问题了吗
https://github.com/openai/codex/issues/2796
应该是没有解决
好的好的,谢谢您。如果有决解也告知一下哈 感谢
最新版测试是可以的
标识符
openai.chatgpt
版本
0.5.11
上次更新时间
2025-09-18, 09:23:01
欸,这里的最新的不是0.4.10吗
预发布版本
We changed some gateway settings. Can you let me know if the issue still persists?
我最新测试了一下codex 插件是可以使用ssh代理了
我试了一下从market place 下载的0.5.11版本 还是不行
请问如何使用代理啊?
奇怪,我更新到0.5.12还是不行,但是我的terminal中一直都是可以用的。
我遇到的问题是 macOS 上的 GPT 客户端无法正常与通过 Remote-SSH 连接的 Linux 上的 VS Code 协作:
远程终端中运行 Codex 正常,本地 VS Code 与 GPT 的协作也正常,但 GPT 客户端无法读取远程文件,也无法正确与远程 VS Code 交互。
测试后发现,将远程 VS Code 上的 Codex 扩展回滚可以恢复功能。
<img width="1002" height="520" alt="Image" src="https://github.com/user-attachments/assets/3cd21056-b701-4962-b564-53e7ab820809" />
I encountered an issue where the GPT client on macOS cannot properly collaborate with VS Code over Remote-SSH to a Linux server. Codex in the remote terminal works fine, and local VS Code + GPT collaboration also works, but the GPT client cannot read files or interact correctly with the remote VS Code session. After testing, rolling back the Codex extension on the remote VS Code helped restore functionality.
https://github.com/MikeJackOne/codex-vscode-remote-dev/blob/main/README.md
参考这个配置哦
https://github.com/MikeJackOne/codex-vscode-remote-dev/blob/main/README.md
参考这个配置哦
本人已经解决该问题了,需要咨询的加微信:thisiseasytosearch,或者参考文档
https://github.com/MikeJackOne/codex-vscode-remote-dev/blob/main/README.md
可以移除掉这个环境变量试试 NODE_OPTIONS=--openssl-legacy-provider,这也是为什么命令行可以,而插件不行的原因之一
为什么我没有找到这个环境变量
请问这个环境变量要在哪里取消设置呢
同问,应该怎么解决?
方案 1:通过全局代理/VPN
确保以下应用走代理:
VSCode 主进程;
VSCode 内置 Node 环境;
GitHub Copilot 扩展子进程。
配置方法(在 VSCode settings.json):
"http.proxy": "http://127.0.0.1:7890",
"https.proxy": "http://127.0.0.1:7890",
"gitHubCopilot.advanced": {
"debug": true
}
注意:如果你的 VPN 只代理浏览器流量(分应用代理),VSCode 不会自动走。要设置系统级或全局代理。
请问是在settings.json后面追加以下内容吗?{
"http.proxy": "http://127.0.0.1:7897",
"https.proxy": "http://127.0.0.1:7897",
"http.proxyStrictSSL": false,
"gitHubCopilot.advanced": {
"debug": true
}
}
回滚到哪个版本呢?我回滚到4.0还是没能解决,我的现象和你是一样的
Closing stale issue. If you're seeing a similar behavior, please use the
/feedbackslash command to upload your logs and session details and file a new bug report.想问下,我在remote服务器上有一个梯子,如何让codex插件走这个梯子呢?