Codex IDE Extension
The Codex IDE extension lets you use Codex directly in your familiar development environment, seamlessly integrating into your daily coding workflow.
Supported IDEs
Codex officially supports the following IDEs:
| IDE | Extension ID | Installation method |
|---|---|---|
| VS Code | openai.chatgpt | vscode:extension/openai.chatgpt |
| VS Code Insiders | openai.chatgpt | Extension Marketplace |
| Cursor | openai.chatgpt | cursor:extension/openai.chatgpt |
| Windsurf | openai.chatgpt | windsurf:extension/openai.chatgpt |
Install Extension
VS Code Installation
VS Code Installation
code --install-extension openai.chatgpt
# Method 2: In VS Code
# 1. Open the extension panel (Cmd+Shift+X)
# 2. Search for "Codex" or "ChatGPT"
# 3. Click Install
Cursor Installation
Cursor Installation
cursor --install-extension openai.chatgpt
# Method 2: In Cursor
# 1. Open the extension panel
# 2. Search for "Codex"
# 3. Click Install
After installation, you need to log in with a ChatGPT account or OpenAI API Key to use it.
Core functionality
Automatic Context
The IDE extension automatically passes the following content to Codex as context:
- Currently open file list
- The text range selected in the editor
- Current working directory info
AI Chat
Chat directly with Codex in the IDE:
- Open the Codex panel (via shortcut key or sidebar)
- Enter a question or task description
- Codex analyzes the current file and project, then replies.
Code Actions
After selecting code, right-click to execute:
| Operation | Features |
|---|---|
| Explanation | Codex explains the functionality of the selected code. |
| Rewrite | Rewrite the selected code as required |
| Review | Check code issues and improvement suggestions |
| Generate Tests | Generate unit tests for the selected code |
Slash Commands
Use slash commands in the Codex panel:
| Command | Features |
|---|---|
/explain | Explain selected code |
/fix | Fix issues in the selected code |
/test | Generate tests for the selected code |
/review | Review selected code |
/plan | Plan first, then execute |
Slash command examples
/explain
# Fix Bugs
/fix this function throws error for null input
# Plan New Features
/plan implement user authentication with JWT
Model Selection
Below the input box, you can switch models:
| Model | Features |
|---|---|
| GPT-5.4 | Flagship model, suitable for complex tasks |
| GPT-5.4-mini | Lightweight and fast, suitable for simple tasks |
| GPT-5.3-Codex | Professional coding model |
Shortcuts
| Shortcuts | Features |
|---|---|
Cmd+Shift+C | Open the Codex panel |
Cmd+Shift+Enter | Code Completion |
Cmd+Shift+R | Rewrite selected code |
Cmd+Shift+E | Explain selected code |
Shortcut keys can be customized in IDE settings to avoid conflicts with other extensions.
Cloud task delegation
Start cloud tasks from the IDE extension:
- Select Cloud mode to create a thread.
- Tasks run in an isolated cloud environment
- After completion, view results via notification or PR
Applicable scenarios
- Need to process multiple tasks in parallel
- Delegate large tasks from low-configuration devices
- Cross-device collaboration
IDE Configuration
Set file opening method
Configuration file opened
# Specify the editor for opening files
file_opener = "vscode"
# Optional values: vscode, vscode-insiders, windsurf, cursor, none
Set default model
Configure default model
model = "gpt-5.4"
Usage Tips
Select code as context
After selecting code, Codex automatically uses it as context.
The more code you select, the more accurate Codex's replies will be.
Multi-file Operations
When multiple files are open, Codex can handle them simultaneously.
Simply describe the file you need to modify in the panel.
Use built-in terminal
The IDE built-in terminal can directly run Codex CLI.
This way, you can enjoy the full functionality of the CLI.
FAQ
Q: Extension cannot connect?
Make sure you are logged in to your Codex account, and check the network connection and proxy settings.
Q: Keyboard shortcuts conflict with other extensions?
Search for "Codex" in the IDE settings and customize the keyboard shortcuts.
Q: How to update the extension?
The extension updates automatically with Codex, or you can manually update it in the IDE extensions panel.
Q: What is the difference between IDE extensions and App?
The IDE extension deeply integrates with the development environment and automatically reads file context; the App offers full functionality and multi-project management.
other extensions