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代理。

相关推荐
weixin_563371471 天前
Android Studio 2024 版 Device Explorer 打开方法
android·ide·android studio
咸咸咸虾1 天前
Microsoft Visual Studio 历史版本与官方安装包链接汇总
ide·microsoft·visual studio
芝士爱沙拉1 天前
原生内置agent智能开发能力的MCU IDE-MounRiver Studio
ide·单片机·嵌入式硬件
2501_915909061 天前
Windows 上用 VS Code 调试 iPhone 真机 App,KXBuild 断点、崩溃定位实操
ide·windows·vscode·ios·iphone·个人开发·敏捷流程
小卡拉米本米1 天前
解决Vscode使用GitHub账号登录慢的问题
ide·vscode·编辑器
小菜要扣篮1 天前
Ubuntu 下使用 vscode 打开 C++ 项目后,无法通过 F12 定位到定义问题解决
c++·vscode·ubuntu
2601_967987371 天前
终端 IDE 卷到了新高度:个人免费,符号索引快 65%,内存省 95%
ide·python·免费·性能·rune
随遇而安zx1 天前
Codex CLI 介绍和使用
ai·codex·智能体
张晓宇 .2 天前
Codex 不显示新模型怎么办?GPT-6.1 Terra 上线后的排查教程:版本、自定义模型目录与 API 支持
人工智能·gpt·大模型·ai编程·codex·deepseek
1024奇点2 天前
【仓颉语言入门 · 第二篇 第 12 课】
开发语言·数据库·ide·mysql·开源