investigation-codex-vscode-extension
Installation
SKILL.md
Investigation: Codex VS Code Extension
[Created by Codex: 019be564-39d9-7b12-a4cf-fb7a7f1af223 2026-01-22]
Purpose
Provide a fast, repeatable workflow to diagnose why the Codex VS Code extension cannot spawn or connect to the local codex app-server.
When to Use
Use when a user reports that Codex in VS Code will not start, errors on spawn, or fails after an extension or CLI update.
Warning Flags (Check First)
- Non-default CLI override is set: If
"chatgpt.cliExecutable"is configured, the extension will run that binary instead of the bundled 45MBcodex. - Assume “custom build” risk: An override often points at a locally built or modified Codex repo; the user must know exactly what it is and why it differs.
- Always surface it explicitly: State the resolved
codexpath andcodex --versionin the RCA, and ask the user to confirm the repo/build they intended to run.
Incident Example (2026-01-22)
- Symptom: “Cannot spawn a Codex agent in VS Code” after updating the extension to
openai.chatgpt0.4.62. - Root cause: The extension started
codex app-server --analytics-default-enabled, but the user had"chatgpt.cliExecutable"pinned to acodex-cli 0.77.0binary that did not recognize that flag, so the process exited with code2. - Evidence:
~/Library/Application Support/Code/logs/.../window*/exthost/openai.chatgpt/Codex.logcontainederror: unexpected argument '--analytics-default-enabled' found. - Fix: Remove or update
"chatgpt.cliExecutable"to a compatiblecodexbinary (or let the extension use its bundled one), then reload VS Code.