VSCode+CodeX扩展,无法启动

问题:早期在VSCode上安装了CodeX扩展,配合CC-Switch使用,没问题。但最近升级了VSCode和扩展后,报错:

Codex could not start

The extension couldn't load its resources.

解决过程:在VSCode中,ctrl+shift + P,输入 Developer: Open Extension Logs Folder,查看插件日志,找到 openai.chatgpt 文件夹,打开 Codex.log,内容如下:

复制代码
2026-08-08 20:44:09.846 [info] Activating Codex extension
2026-08-08 20:44:09.846 [info] [CodexMcpConnection] Spawning codex app-server
2026-08-08 20:44:09.846 [info] [IpcRouter] I am the router
2026-08-08 20:44:09.846 [warning] [CodexMcpConnection] cli: message="codex_core_plugins::remote::remote_installed_plugin_sync: remote installed plugin bundle sync failed error=chatgpt authentication required for remote plugin catalog; api key auth is not supported"
2026-08-08 20:44:09.846 [info] [CodexMcpConnection] Initialize received id=1
2026-08-08 20:44:09.846 [warning] [IpcClient] Received broadcast but no handler is configured method=client-status-changed
2026-08-08 20:44:09.847 [warning] [CodexMcpConnection] cli: message="codex_core_plugins::manager: failed to warm featured plugin ids cache error=failed to send remote featured plugin request to https://chatgpt.com/backend-api/plugins/featured?platform=codex: error sending request for url (https://chatgpt.com/backend-api/plugins/featured?platform=codex)"
2026-08-08 20:44:10.326 [info] [IpcRouter] I am the router
2026-08-08 20:44:10.378 [info] [statsig-refresh-diagnostics] React root render requested windowType=extension
2026-08-08 20:44:10.485 [warning] [IpcClient] Received broadcast but no handler is configured method=client-status-changed
2026-08-08 20:44:11.309 [error] Request failed conversationId=none durationMs=572 error={"code":-32603,"message":"系统找不到指定的路径。 (os error 3)"} failureReason=null id=3e096a01-8a2b-49fd-ac4a-f47e0d8c2579 method=fs/readFile pendingCountAfter=0 priority=interactive queueWaitMs=0 source=filesystem spanId=null timeoutMs=0 traceId=null
2026-08-08 20:44:39.810 [error] [CodexWebviewProvider] Webview did not finish starting extensionVersion=26.803.41515 role=sidebar
2026-08-08 20:44:55.577 [error] Error fetching error="TypeError: fetch failed" url=https://ab.chatgpt.com/v1/initialize?k=client-sYWqzCYMRkUg4DqqiZcR5DGTNl2iD7zNJY0HoeDLzxR&st=javascript-client&sv=3.33.3&t=1786193051186&sid=3f4139f2-a58f-4ba1-9b79-527cf96f47d0&se=1
2026-08-08 20:45:05.860 [error] Error fetching error="TypeError: fetch failed" url=https://ab.chatgpt.com/v1/initialize?k=client-sYWqzCYMRkUg4DqqiZcR5DGTNl2iD7zNJY0HoeDLzxR&st=javascript-client&sv=3.33.3&t=1786193061692&sid=3f4139f2-a58f-4ba1-9b79-527cf96f47d0&se=1
2026-08-08 20:45:18.194 [error] Error fetching error="TypeError: fetch failed" url=https://ab.chatgpt.com/v1/initialize?k=client-sYWqzCYMRkUg4DqqiZcR5DGTNl2iD7zNJY0HoeDLzxR&st=javascript-client&sv=3.33.3&t=1786193073719&sid=3f4139f2-a58f-4ba1-9b79-527cf96f47d0&se=1
2026-08-08 20:45:21.931 [warning] [CodexMcpConnection] cli: message="codex_core_plugins::startup_sync: git sync failed for curated plugin sync; falling back to GitHub HTTP error=git ls-remote curated plugins repo timed out after 30s: fatal: unable to access 'https://github.com/openai/plugins.git/': schannel: server closed abruptly (missing close_notify)"

查看日志发现无法连接,没有走CC-Switch代理,最终调整VSCode的settings.json配置如下:

复制代码
    "codex.apiKey": "cc-switch",
    "codex.baseUrl": "http://127.0.0.1:15721/v1",
    "http.proxyAuthorization": null,
    "http.proxy": "http://127.0.0.1:15721",
    "http.proxyStrictSSL": false

后两行是新增加的代理,无论是LLM还是其他交互,都走cc-switch代理。

相关推荐
国产化创客1 天前
创客开发入门(三)Arduino IDE 开发环境
ide·单片机·嵌入式硬件·课程设计·智能硬件
冰水不凉1 天前
CodeX 在 Ubuntu 下 vscode 插件的 bug 问题
vscode·ubuntu·bug
2601_962296281 天前
python初学者怎么选IDE
ide·python·开发环境·初学者·工具选择
滨哥GPT1 天前
Codex改完代码为什么保存后页面还是不生效?热更新、文件监听与开发服务器排查
前端开发·热更新·开发调试·codex·hmr
程序员阿明1 天前
idea把插件啥的不默认放在C盘
java·ide·intellij-idea
JMchen1231 天前
Cursor高阶玩法:.cursorrules编写与Spec-Driven开发实战,把AI调教成专属结对编程搭档
人工智能·vscode·kotlin·cursor·结对编程·spec-driven·.cursorrules
我是Superman丶2 天前
Arduino IDE 安装教程:Windows/macOS/Linux 开发环境搭建
ide·windows·macos
滨哥GPT2 天前
Codex新增文件上传后为什么小文件正常,大文件总失败?Multipart、Body Limit与Nginx限制排查
nginx·ai编程·文件上传·codex·multipart
LaughingZhu2 天前
Product Hunt 每日热榜 | 2026-09-08
java·ide·深度学习·百度·intellij-idea