本文根據 Codex 官方文檔《Codex IDE extension》《IDE extension settings》《Windows sandbox》《Authentication》整理,資料核對於 2026-10-28。官方沒有「擴展不加載」的專門排查頁,本文按官方入口和設定整理。配圖為本站整理的示意圖,不是軟件截圖。
適用於誰
- 想在 VS Code(或 Cursor、Windsurf)裏裝 Codex 的人;
- 裝好了但側邊欄沒有 Codex,或點了沒反應的人;
- 在 Windows 或 WSL 裏用的人。
結論先說
- 官方擴展的 ID 是
openai.chatgpt,VS Code、Cursor、Windsurf 都用這個擴展。 - 打開方式:點側邊欄的 Codex 圖標;看不到圖標,就打開命令面板,運行 Codex: Open Codex Sidebar。
- 登入:未登入介面選 Sign in with ChatGPT,或選 Use API Key,輸入密鑰後點 OK。
- Windows 上裝好但沒反應:官方說可能是系統缺 C++ 開發工具,需要 Visual Studio Build Tools(C++ 工作負載)和 Microsoft Visual C++ Redistributable(x64),裝好後完全重啟 VS Code。
- 項目在 WSL 裏:設定
chatgpt.runCodexInWindowsSubsystemForLinux,改動會重新加載 VS Code。

圖:本站根據 Codex 官方文檔:Codex IDE extension 整理的示意圖
一、安裝和打開
官方步驟:安裝或啟用 Codex 後,登入,在編輯器裏開始對話。VS Code 及兼容的編輯器用 Codex 擴展;Xcode 和 JetBrains IDE 提供各自的集成。
- Xcode:打開編碼助手,新建對話,選 Codex 作為智能體;
- JetBrains:打開 AI Chat 並選 Codex;
- 開始第一個對話時,官方建議先在任務前後做 Git 檢查點,方便撤銷改動。
登入方式的區別(ChatGPT 帳號與 API 密鑰)見 /guides/codex-cannot-sign-in-send-message-connect;入門總覽見 /guides/codex-getting-started。
二、不加載、沒反應,逐項排查

圖:本站根據 Codex 官方文檔 整理的示意圖
1. 側邊欄沒有圖標
官方寫明:圖標不可見時,用命令面板運行 Codex: Open Codex Sidebar。想讓每次啟動 VS Code 都自動聚焦 Codex 側邊欄,把設定 chatgpt.openOnStartup 設為 true(預設是 false)。設定在 VS Code 裏搜尋 @ext:openai.chatgpt 或設定名即可,也可以在擴展的齒輪圖標裏選 Codex Settings > Open config.toml 打開配置文件。
2. Windows 上裝好了但沒反應
官方《Windows sandbox》裏的「IDE extension is installed but unresponsive」:系統可能缺 C++ 開發工具,部分原生依賴需要它。需要裝 Visual Studio Build Tools(C++ 工作負載)和 Microsoft Visual C++ Redistributable(x64)。官方給的 winget 命令是 winget install --id Microsoft.VisualStudio.2022.BuildTools -e。裝完後要完全重啟 VS Code。沙箱本身的問題見 /guides/codex-windows-sandbox-setup-failed。
3. 項目在 WSL 裏
設定 chatgpt.runCodexInWindowsSubsystemForLinux(僅 Windows,預設 false):在 WSL 可用時讓 Codex 跑在 WSL 裏,適合倉庫和工具鏈在 WSL2 的情況,修改後會重新加載 VS Code。
4. 想用插件,但 IDE 裏沒有
官方明確:IDE 擴展不支持插件,要瀏覽和安裝插件,用桌面 App 或命令行,見 /guides/codex-plugins-where-to-install。
5. 其他常用設定
官方列了幾個擴展設定:chatgpt.commentCodeLensEnabled 在 TODO 註釋上方顯示 CodeLens;chatgpt.followUpQueueMode 決定運行中發的消息是排隊(queue)還是插入當前回合(steer);chatgpt.composerEnterBehavior 決定 Enter 是否直接發送;chatgpt.localeOverride 設介面語言,留空自動檢測;chatgpt.cliExecutable 只用於開發,手動覆蓋內置的可執行文件可能讓擴展的部分功能失效。這些 chatgpt.* 設定屬於擴展,不寫進 config.toml。
三、和桌面 App 同時用
官方說明:桌面 App 和 IDE 擴展在同一項目裏打開時,會共享活動對話和編輯器上下文;在 App 輸入框打開 IDE context 就能讓 Codex 用你編輯器裏打開的文件。提示「This is open in another app」的情況見 /guides/codex-vscode-open-in-another-app。
常見問題
Q:擴展登入後沒有額度?
額度按你的 ChatGPT 套餐算,見 /guides/codex-usage-limits;想開通 Plus 可以看 /chongzhi/chatgpt-plus。
Q:Cursor 裏能裝嗎?
官方文檔把 Cursor 列在可裝擴展的編輯器裏,同樣用 openai.chatgpt。Cursor 自己的功能和 Codex 的對比見 /guides/cursor-vs-claude-code-vs-codex。
Q:其他報錯怎麼對照?
見 /guides/codex-common-errors-summary。
參考資料
- Codex 官方文檔:Codex IDE extension — https://learn.chatgpt.com/docs/codex/ide
- Codex 官方文檔:IDE extension settings — https://learn.chatgpt.com/docs/developer-settings
- Codex 官方文檔:Windows sandbox — https://learn.chatgpt.com/docs/windows/windows-sandbox
- Codex 官方文檔:Authentication — https://learn.chatgpt.com/docs/auth
0 條評論
還沒有評論,來搶沙發~