GuidesHosting choices

Codex in VS Code: install, sign in, modes, Remote-SSH, WSL

OpenAI’s Codex extension for VS Code, Cursor and Windsurf: install ID, sign-in, the permission modes, shared config.toml, cloud handoff, Remote-SSH, WSL fixes.

November 23, 2026The Everpod team
The short answer

OpenAI’s Codex extension for VS Code is listed as Codex – OpenAI’s coding agent, ID openai.chatgpt, and the same extension installs in Cursor and Windsurf. Install it with code --install-extension openai.chatgpt, open it from the Codex icon or Codex: Open Codex Sidebar in the Command Palette, and choose Sign in with ChatGPT (Plus, Pro, Business, Edu or Enterprise) or Use API Key. The permissions control under the composer sets what it does alone: Ask for approval edits inside the workspace and asks before touching other files or the internet, Approve for me keeps that sandbox but lets an automatic reviewer answer, and Full access turns off the sandbox and the prompts. It reads the same ~/.codex/config.toml and the same saved sign-in as the Codex CLI, hands a chat to Codex cloud from the cloud icon, and in a Remote-SSH or WSL window it runs on the remote side, with that machine’s files, settings and login. The current release is 26.1117.41037, published November 20, 2026.

Install it in VS Code, Cursor or Windsurf

The extension is on the VS Code Marketplace, published by OpenAI, with more than 17 million installs as of November 23, 2026. From a terminal:

code --install-extension openai.chatgpt
Copied

OpenAI’s IDE extension page points Cursor and Windsurf at the same ID (its buttons open cursor:extension/openai.chatgpt and windsurf:extension/openai.chatgpt). Cursor installs extensions from Open VSX, where OpenAI publishes it as a verified openai.chatgpt at the same version numbers. JetBrains IDEs and Xcode are the exception: they have their own Codex integrations, chosen in JetBrains’ AI Chat and in Xcode’s coding assistant.

Sign in: a ChatGPT plan or an API key

The signed-out screen has two buttons, per OpenAI’s authentication page: Sign in with ChatGPT, which opens a browser and returns your credentials to the extension, and Use API Key, where you paste a key from the OpenAI platform and select OK.

Permissions: Ask for approval, Approve for me, Full access

The permissions control beneath the composer is the extension’s equivalent of the CLI’s /permissions. OpenAI’s permissions page recommends starting with Ask for approval and describes the entries this way:

ModeWhat the menu saysUnderneath
Ask for approval
“Always ask to edit external files and use the internet”The workspace-write sandbox; requests to go beyond it come to you
Approve for me
“Only ask for actions detected as potentially unsafe”The same sandbox, approval_policy on-request, with approvals_reviewer set to auto_review
Full access
“Unrestricted access to the internet and any file on your computer”sandbox_mode = "danger-full-access" with approval_policy = "never"
Custom (config.toml)
“Uses permissions defined in config.toml”Whatever your file sets, such as sandbox_mode = "read-only" for a chat that reads but asks before any edit or command

The menu can also list named permission profiles, and an organization’s policy can remove entries. The sandbox is what lets the first two run unattended: per the sandboxing page, commands Codex starts, “git, package managers, or test runners” included, inherit it, enforced by Seatbelt on macOS, bubblewrap on Linux and WSL2, and the Windows sandbox on native Windows. Its network is off: “the default workspace-write sandbox mode keeps network access turned off unless you enable it in your configuration”, so an npm install or a test that calls an API stops for approval in Ask for approval mode. To allow it, add this to ~/.codex/config.toml:

[sandbox_workspace_write]
network_access = true
Copied

Approve for me does not widen the sandbox; it sends the requests to a reviewer model, which “uses extra model calls, so it can add to Codex usage.” If the entry is missing or greyed out, OpenAI’s troubleshooting page points at an explicit features.guardian_approval = false in your config, or at a workspace policy you cannot override locally. To have Codex propose before it edits, /plan toggles plan mode. The trade-offs of running with no prompts at all are in Claude Code and Codex without permission prompts.

What it shares with the Codex CLI, and what is the editor’s own

OpenAI’s extension settings page splits the settings in two. The agent’s side, “the model, reasoning effort, permissions, sandbox, MCP servers, and personalization”, is read from config.toml, the same layered file the CLI reads: your ~/.codex/config.toml and a trusted project’s .codex/config.toml. Select the gear in the Codex sidebar, then Codex Settings for the common controls or Open config.toml for the file. Where each layer lives and which one wins is in the config.toml guide.

The editor’s side lives in VS Code’s own settings under chatgpt.* keys (search @ext:openai.chatgpt), and those “don’t go in config.toml”. The ones worth knowing, with their defaults:

SettingDefaultWhat it does
chatgpt.followUpQueueMode
queueA message sent while Codex is working waits for the next run (queue) or steers the current one (steer); Cmd/Ctrl+Shift+Enter does the opposite once
chatgpt.composerEnterBehavior
enterEnter sends; cmdIfMultiline needs Cmd/Ctrl+Enter for multi-line prompts, cmdAlways always
chatgpt.reviewDelivery
inline/review runs in the current chat, or in a separate one with detached
chatgpt.commentCodeLensEnabled
trueAn Implement with Codex link above TODO comments
chatgpt.openOnStartup
falseFocus the Codex sidebar when the extension starts
chatgpt.runCodexInWindowsSubsystemForLinux
falseWindows only; see the WSL section, where the docs and the extension disagree

MCP servers are added from the gear menu: MCP servers, Add server, a name, STDIO or Streamable HTTP, then Restart extension; an OAuth server shows Authenticate. They are saved to config.toml, and OpenAI’s MCP page adds: “The ChatGPT desktop app, Codex CLI, and IDE extension share this configuration.” The file format is in Codex MCP servers.

The ChatGPT desktop app, which now contains the Codex app, links up with the extension: “When the ChatGPT desktop app and IDE extension are open in the same project, they share active chats and editor context,” and you can open an app chat from the extension or continue an extension chat in the app.

The Codex binary is not shared. The extension runs its own bundled executable, so its Codex version is the extension’s, not necessarily your CLI’s. chatgpt.cliExecutable can point it elsewhere, but OpenAI labels that setting development-only and warns that “manually overriding the bundled executable can prevent parts of the extension from working.” So the editor and the CLI can disagree about which models and features exist.

Editor context, commands and slash commands

“The IDE extension automatically includes your open files as context,” per OpenAI’s prompting guide, and /ide-context turns that on or off. To point at specific code, select it and run Add to Codex Chat, or add a whole file with Add File to Codex Chat; both are in the Command Palette under Codex and can be given shortcuts. chatgpt.newChat is Cmd+N on macOS and Ctrl+N on Windows and Linux. OpenAI’s own advice on its IDE page: “Create Git checkpoints before and after a task so you can revert changes.”

Typing / in the composer lists the slash commands. From OpenAI’s command reference:

CommandWhat it does
/model, /reasoning
Choose the model, and the reasoning effort, for the current chat
/plan
Toggle plan mode for multi-step planning
/review
Review uncommitted changes, or compare against a base branch
/local, /cloud, /cloud-environment
Run the chat in your workspace or in the cloud, and choose its cloud environment
/worktree
Run the chat in a new Git worktree
/status
Show the chat ID, context usage and rate limits
/mcp
Show connected MCP servers
/init
Generate an AGENTS.md scaffold for the project
/side, /fork, /compact
A temporary side chat, a copy of the chat, or a compacted context

Handing a task to Codex cloud

A chat can move from your machine to OpenAI’s. The prompting guide’s steps: “Click on the cloud icon beneath the prompt composer and select your cloud environment.” With your next prompt, “Codex creates a new chat in the cloud that carries over the existing chat context (including the plan and any local source changes).” /cloud and /cloud-environment do the same from the keyboard, and /local brings the next run back. You review the cloud diff in the same chat, then open a pull request from the cloud or pull the changes down.

What it takes: a ChatGPT sign-in, since API keys get no cloud features; Plus, Pro, Business or Enterprise, the plans the pricing page lists for Codex cloud; and a cloud environment, which is created “on the web or in the desktop app”, not in the editor. If you sign in to ChatGPT with an email and password, OpenAI requires multi-factor authentication before Codex cloud opens. Beyond the chat and your changes, the cloud machine gets nothing of yours: “Your computer’s local files, running processes, browser sign-ins, and VPN access aren’t automatically transferred to it.” How long a cloud task keeps its state, and when a machine of your own fits better, is in Codex cloud or your own machine.

Codex on a remote machine: Remote-SSH, WSL and containers

Remote-SSH

The registries list Codex as a workspace extension, and VS Code runs workspace extensions “on the remote machine / environment” whenever the folder is remote, child processes included. So in a Remote-SSH window Codex is installed on the server and works there: its commands run on the server, it edits the server’s files, and the ~/.codex it reads and writes, with config.toml, the sign-in and the chat history, belongs to the account you connected as, not to your laptop. When you first connect, a locally installed Codex shows dimmed under Local - Installed; select Install to put it on the host, or list it for every host in your VS Code settings:

"remote.SSH.defaultExtensions": ["openai.chatgpt"]
Copied

Developer: Show Running Extensions tells you which side an extension runs on. Codex Audio is a ui extension and stays on your computer, which is how dictation keeps using your own microphone in a remote window.

Two things follow from Codex living on the server. Its sandbox needs bubblewrap there, and on Ubuntu 24.04 it may also need an extra AppArmor profile loaded; both are in Codex CLI on a Linux server. And one Linux account shared by several people is one Codex, sign-in and history included. When a user reported exactly that, an OpenAI engineer answered “If you’re sharing the same account on a server, then you all have access to the same files, home directory, etc.”, and pointed at separate accounts as the fix.

WSL

Here OpenAI’s docs and the extension disagree. The settings page and the security page tell you to set chatgpt.runCodexInWindowsSubsystemForLinux to true (“Run Codex in WSL when WSL is available”). The extension’s own description of that setting, in 26.1117.41037, reads: “Deprecated. To run Codex in WSL, reopen your folder using the Microsoft WSL extension. Turn this setting off to run Codex on Windows. Changing it reloads the window.” OpenAI’s WSL page describes the same route the extension now asks for, a WSL window opened from inside Linux:

# from your WSL shell
cd ~/code/your-project
code .
Copied

The status bar then shows WSL: <distro>, and Codex runs in Linux under the Linux sandbox, so install bubblewrap in the distribution. Keep the repository under your Linux home rather than /mnt/c, which the page says is slower. WSL1 is out: it “was supported through Codex 0.114”, and 0.115 moved the Linux sandbox to bubblewrap. Native Codex on Windows keeps its files in %USERPROFILE%\.codex and Codex inside WSL in the Linux home, and OpenAI’s Windows page says they don’t share configuration, cached sign-in or history unless you sync the two folders or point CODEX_HOME at one. Setting WSL up in the first place is its own guide.

Dev containers

OpenAI’s security page gives two ways to run Codex in a Dev Container: keep its Linux sandbox if the container grants what bubblewrap needs, or treat the container as the boundary and run Codex with full access inside it. It is direct about the second: “a malicious project can exfiltrate anything available inside the devcontainer, including Codex credentials.”

Codex in VS Code’s own chat, without the extension

VS Code now treats Codex as one of its agent harnesses beside Copilot and Claude. Its harness docs (November 2026) say “Codex is not listed by default” and give two routes. The extension above is one: installed, it adds Codex to VS Code’s Chat view. The other is an experimental Agent Host integration: enable chat.agentHost.codexAgent.enabled “to make Codex available in the Agents window without the OpenAI Codex extension,” and chat.editor.codex.preferAgentHost to use it in the Chat view too, where it replaces the extension’s Codex choice: “Only one Codex implementation appears in each window.” It runs on Copilot Pro+ or on a ChatGPT sign-in, about which the docs say: “A free ChatGPT account is sufficient.” Its own permission picker offers Default Permissions, Auto-Review and Full Access. Copilot’s enterprise-managed settings turn the Codex harness off unless an administrator allows it.

When it goes wrong

Run Codex on an always-on developer pod.

A developer pod is a permanent cloud computer (VPS), set up and secured for you, with your pick of Claude Code, Codex, OpenCode, Pi, Hermes and OpenClaw installed. Run more agents at once than your laptop can hold, and keep them working when it’s closed. From $24 a month, built in about ten minutes.