API Dashboard ↗

Codex IDE Extension

OpenAI's coding agent for your editor

Overview

The Codex IDE extension brings OpenAI's coding agent directly into your editor. It reads your codebase, edits files, runs commands, and integrates with your development workflow — all without leaving your IDE.

Platform support

Codex IDE integrations are available for VS Code-compatible editors and JetBrains IDEs on macOS, Windows, and Linux:

Install the extension from the Visual Studio Code Marketplace or your JetBrains IDE's plugin manager.

Authentication

Sign in with your ChatGPT account or an API key. ChatGPT Plus, Pro, Business, Edu, and Enterprise plans include Codex access. The extension updates automatically and supports customizable keyboard shortcuts.


Features

Chat and editing

Reference files with @filename syntax to provide context, enabling shorter, more focused prompts. The interface supports seamless previewing of changes before they are applied.

Model selection

A built-in model switcher allows you to change models dynamically during work sessions.

Reasoning control

Adjust reasoning effort to low, medium, or high. Higher settings provide deeper analysis but consume more tokens and require longer response times.

Approval modes

The extension offers three operational modes:

ModeDescription
ChatConversation-only mode for planning and discussion.
AgentCodex automatically handles file reading, editing, and local commands. Network access requires approval.
Agent (Full Access)Unrestricted file and network access without approval prompts.

Cloud execution

Offload work to Codex's cloud environment by selecting a configured cloud workspace and choosing Run in the cloud. Tasks execute from either the main branch or local changes. Follow-up prompts maintain conversation context, and changes can be reviewed in the cloud interface before local application.

Web search

Enabled by default for local tasks. Uses an OpenAI-maintained cache of indexed results rather than live fetching, reducing injection risks while maintaining relevance.

Image generation

Built-in image creation using gpt-image-2. Invoke explicitly with $imagegen or request naturally in your prompt. Image generation counts toward standard usage limits.

Image import

Attach images to prompts with Shift+drag-and-drop into the chat interface. Use screenshots or design specs so Codex can reason about visual content alongside code.


Settings

The Codex IDE extension can be customized through editor settings and a shared configuration file.

How to change settings

  1. Open editor settings
  2. Search for "Codex" or the specific setting name
  3. Update the value
The extension relies on the Codex CLI, and some behaviors — like default model selection, approvals, and sandbox configuration — are managed through ~/.codex/config.toml rather than editor settings.

Settings reference

SettingPurpose
chat.fontSizeAdjusts chat text size in the sidebar, including conversation content and composer.
chat.editor.fontSizeControls code-rendered content display, including snippets and diffs.
chatgpt.cliExecutableDevelopment-only setting for specifying the Codex CLI executable path.
chatgpt.commentCodeLensEnabledEnables CodeLens above to-do comments for Codex completion.
chatgpt.localeOverrideSets preferred UI language (auto-detects if left empty).
chatgpt.openOnStartupFocuses the Codex sidebar upon extension startup.
chatgpt.runCodexInWindowsSubsystemForLinuxWindows-specific: runs Codex in WSL when available. Requires VS Code reload.

IDE Commands

The Codex IDE extension provides commands accessible through the VS Code Command Palette to control Codex functionality directly from your editor.

Assigning key bindings

  1. Open the Command Palette with Cmd+Shift+P (macOS) or Ctrl+Shift+P (Windows/Linux)
  2. Select Preferences: Open Keyboard Shortcuts
  3. Search for "Codex" or a specific command ID like chatgpt.newChat
  4. Click the pencil icon and input your preferred shortcut

Available commands

CommandDefault BindingFunction
chatgpt.addToThreadNoneInclude selected text as context within the active thread.
chatgpt.addFileToThreadNoneInclude the complete file as context for the active thread.
chatgpt.newChatCmd+N / Ctrl+NStart a new conversation thread.
chatgpt.implementTodoNoneDirect Codex to resolve a highlighted TODO comment.
chatgpt.newCodexPanelNoneLaunch an additional Codex panel.
chatgpt.openSidebarNoneDisplay the Codex sidebar interface.

Slash Commands

Type / in the chat input, select from the dropdown list (or continue typing to filter), and press Enter.

CommandDescription
/auto-contextToggle automatic inclusion of recent files and IDE context.
/cloudSwitch to remote cloud execution mode.
/cloud-environmentSelect which cloud environment to use.
/feedbackSubmit user feedback and optionally attach logs.
/localSwitch to local workspace execution.
/reviewInitiate code review mode for uncommitted changes.
/statusDisplay thread ID, context usage, and rate limit information.