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 天前
Window11为什么出现codex桌面端频繁打不开和网络等待问题解决
codex
空单蛋1 天前
光遗传学与空间蛋白组学如何结合?从神经元精准调控到组织空间解析
codex·pcf空间单细胞蛋白组·pcf技术
*wait for?1 天前
VScode使用uv-创建python虚拟环境
ide·vscode·编辑器
意法半导体STM321 天前
【官方原创】LAT1724 STM32CubeIDE for VSCode 修改链接文件中的起始地址无效?
vscode·stm32·单片机·嵌入式硬件·mcu·stm32cube
浩风祭月2 天前
ChatGPT Work和Codex为什么共用额度?在哪里看剩余量
人工智能·chatgpt·plus·codex·chatgpt work·chatgpt额度·用量查询
ZARD9962 天前
Codex 连接 Figma:让 AI 读取 Figma UI 设计稿数据
ui·figma·codex
超级大福宝2 天前
VS Code Remote-SSH 因 RemoteForward 端口冲突导致连接失败的排查与解决
运维·服务器·windows·vscode·ssh
枫叶丹42 天前
AI Agent 说完成了,怎样验证任务真的完成
人工智能·chatgpt·开源·agent·codex
MandalaO_O3 天前
IDEA 开发(快捷键 + 调试 + 序列化)
java·ide·intellij-idea