VS Code Remote-SSH: Codex extension stuck on “Thinking”

Resolved 💬 27 comments Opened Aug 31, 2025 by MstarLioning Closed Jan 13, 2026
💡 Likely answer: A maintainer (etraut-openai, contributor) responded on this thread — see the highlighted reply below.

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_

View original on GitHub ↗

27 Comments

FireFoxzzzz · 10 months ago

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" />

MstarLioning · 10 months ago

@FireFoxzzzz 试试终端跑吧,终端没问题,vscode里下载的codex不行,对于ssh远程连接的

Saunak626 · 10 months ago
@FireFoxzzzz 试试终端跑吧,终端没问题,vscode里下载的codex不行,对于ssh远程连接的

同终端可以,codex插件不行。这个无法解决吗? @fouad-openai

efengshan · 10 months ago

I come across the same question, I can run the codex in the terminal but not in vsocde extensions.

efengshan · 10 months ago

请问一下您最终解决了这个问题了吗

Saunak626 · 10 months ago
请问一下您最终解决了这个问题了吗

https://github.com/openai/codex/issues/2796

应该是没有解决

efengshan · 10 months ago
> 请问一下您最终解决了这个问题了吗 #2796 应该是没有解决

好的好的,谢谢您。如果有决解也告知一下哈 感谢

FireFoxzzzz · 10 months ago

最新版测试是可以的

标识符
openai.chatgpt
版本
0.5.11
上次更新时间
2025-09-18, 09:23:01

efengshan · 10 months ago

欸,这里的最新的不是0.4.10吗

FireFoxzzzz · 10 months ago
欸,这里的最新的不是0.4.10吗

预发布版本

Saunak626 · 10 months ago
> > 请问一下您最终解决了这个问题了吗 > > > #2796 > 应该是没有解决 好的好的,谢谢您。如果有决解也告知一下哈 感谢

We changed some gateway settings. Can you let me know if the issue still persists?

我最新测试了一下codex 插件是可以使用ssh代理了

efengshan · 10 months ago

我试了一下从market place 下载的0.5.11版本 还是不行

LucasGY · 10 months ago
> > > 请问一下您最终解决了这个问题了吗 > > > > > > #2796 > > 应该是没有解决 > > > 好的好的,谢谢您。如果有决解也告知一下哈 感谢 We changed some gateway settings. Can you let me know if the issue still persists? 我最新测试了一下codex 插件是可以使用ssh代理了

请问如何使用代理啊?

efengshan · 10 months ago

奇怪,我更新到0.5.12还是不行,但是我的terminal中一直都是可以用的。

guanshantingbai · 10 months ago

我遇到的问题是 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.

MikeJackOne · 9 months ago
@FireFoxzzzz 试试终端跑吧,终端没问题,vscode里下载的codex不行,对于ssh远程连接的

https://github.com/MikeJackOne/codex-vscode-remote-dev/blob/main/README.md

参考这个配置哦

MikeJackOne · 9 months ago
我遇到的问题是 macOS 上的 GPT 客户端无法正常与通过 Remote-SSH 连接的 Linux 上的 VS Code 协作: 远程终端中运行 Codex 正常,本地 VS Code 与 GPT 的协作也正常,但 GPT 客户端无法读取远程文件,也无法正确与远程 VS Code 交互。 测试后发现,将远程 VS Code 上的 Codex 扩展回滚可以恢复功能。 <img alt="Image" width="1002" height="520" src="https://private-user-images.githubusercontent.com/155876521/491826436-3cd21056-b701-4962-b564-53e7ab820809.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NjA0NTgwMDksIm5iZiI6MTc2MDQ1NzcwOSwicGF0aCI6Ii8xNTU4NzY1MjEvNDkxODI2NDM2LTNjZDIxMDU2LWI3MDEtNDk2Mi1iNTY0LTUzZTdhYjgyMDgwOS5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUxMDE0JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MTAxNFQxNjAxNDlaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT03YTlkNTVhM2M1ZjRjMmIzNzA2NzM2ODEyODIyNWEyNjk5OGRjODZjMmU1YjFmMmFiZWQ5MzE4NjJiZGIxYTA5JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.SmmN9U37VUKrfW0wRdGWxJ_X6Hr6TmuS7uXSwpfBB94"> 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

参考这个配置哦

MikeJackOne · 9 months ago

本人已经解决该问题了,需要咨询的加微信:thisiseasytosearch,或者参考文档
https://github.com/MikeJackOne/codex-vscode-remote-dev/blob/main/README.md

microzbz · 9 months ago

可以移除掉这个环境变量试试 NODE_OPTIONS=--openssl-legacy-provider,这也是为什么命令行可以,而插件不行的原因之一

efengshan · 9 months ago
可以移除掉这个环境变量试试 NODE_OPTIONS=--openssl-legacy-provider,这也是为什么命令行可以,而插件不行的原因之一

为什么我没有找到这个环境变量

Wangmerlyn · 9 months ago
可以移除掉这个环境变量试试 NODE_OPTIONS=--openssl-legacy-provider,这也是为什么命令行可以,而插件不行的原因之一

请问这个环境变量要在哪里取消设置呢

WLBRich · 8 months ago

同问,应该怎么解决?

fractalists · 8 months ago

方案 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 不会自动走。要设置系统级或全局代理。

WLBRich · 8 months ago
方案 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
}
}

zzwzds · 8 months ago
我遇到的问题是 macOS 上的 GPT 客户端无法正常与通过 Remote-SSH 连接的 Linux 上的 VS Code 协作: 远程终端中运行 Codex 正常,本地 VS Code 与 GPT 的协作也正常,但 GPT 客户端无法读取远程文件,也无法正确与远程 VS Code 交互。 测试后发现,将远程 VS Code 上的 Codex 扩展回滚可以恢复功能。 <img alt="Image" width="1002" height="520" src="https://private-user-images.githubusercontent.com/155876521/491826436-3cd21056-b701-4962-b564-53e7ab820809.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NjM0NTQyMTQsIm5iZiI6MTc2MzQ1MzkxNCwicGF0aCI6Ii8xNTU4NzY1MjEvNDkxODI2NDM2LTNjZDIxMDU2LWI3MDEtNDk2Mi1iNTY0LTUzZTdhYjgyMDgwOS5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUxMTE4JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MTExOFQwODE4MzRaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1lMjAzNmE1M2MwZmJkODhmMDg2YWVjZjIzY2NlZjJjNmNkZjQzYTMyYzEwOTM0NjQzMjJlYmI0OGUzMDRjNWNmJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.j6QipzcMPN5LUFV_uuajTSUpau_ATAOZaBxgwCinDH0"> 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.

回滚到哪个版本呢?我回滚到4.0还是没能解决,我的现象和你是一样的

etraut-openai contributor · 6 months ago

Closing stale issue. If you're seeing a similar behavior, please use the /feedback slash command to upload your logs and session details and file a new bug report.

CACACAZ · 5 months ago

想问下,我在remote服务器上有一个梯子,如何让codex插件走这个梯子呢?