This skill should be used when investigating why the Codex VS Code extension fails to spawn or connect to a local Codex agent, especially after updates or CLI changes.
[Created by Codex: 019be564-39d9-7b12-a4cf-fb7a7f1af223 2026-01-22]
Provide a fast, repeatable workflow to diagnose why the Codex VS Code extension cannot spawn or connect to the local codex app-server.
Use when a user reports that Codex in VS Code will not start, errors on spawn, or fails after an extension or CLI update.
"chatgpt.cliExecutable" is configured, the extension will run that binary instead of the bundled 45MB codex.codex path and codex --version in the RCA, and ask the user to confirm the repo/build they intended to run.openai.chatgpt 0.4.62.codex app-server --analytics-default-enabled, but the user had "chatgpt.cliExecutable" pinned to a codex-cli 0.77.0 binary that did not recognize that flag, so the process exited with code 2.~/Library/Application Support/Code/logs/.../window*/exthost/openai.chatgpt/Codex.log contained error: unexpected argument '--analytics-default-enabled' found."chatgpt.cliExecutable" to a compatible codex binary (or let the extension use its bundled one), then reload VS Code.codex binary VS Code is running (this is frequently the root cause):"chatgpt.cliExecutable" in:~/Library/Application Support/Code/User/settings.json<repo>/.vscode/settings.jsoncodex (often a custom build).ls ~/.vscode/extensions | rg -i 'openai.chatgpt'cat ~/.vscode/extensions/<ext>/package.json (read main)rg -n -- 'spawn|CLI_EXECUTABLE|codex|app-server' ~/.vscode/extensions/<ext>/out/extension.jscodex binary the extension uses:"chatgpt.cliExecutable" is set, it wins.~/.vscode/extensions/<ext>/bin/<platform>/codex.~/Library/Application Support/Code/logs/<latest>/window*/exthost/openai.chatgpt/Codex.log.../exthost/exthost.log for activation and stack traces.ENOENT, EACCES, exit code).extension.js with codex app-server --help for the selected binary.chatgpt.cliExecutable).codex --version for (a) terminal PATH (b) configured chatgpt.cliExecutable target (c) extension-bundled binary.EACCES appears.chatgpt.cliExecutable, point to newer binary, reload window.chatgpt.cliExecutable pinned to an older CLI missing new flags.EACCES).