Codex IDE Extension
Install and use the Codex IDE extension — ghost text predictions, inline chat for modifying code, and sidebar communication with full workspace context.
Installing the Extension
The Codex extension is available for the most popular code editors:
VS Code
- Open the Extensions panel (Cmd+Shift+X on Mac, Ctrl+Shift+X on Windows)
- Search for "OpenAI Codex"
- Click Install
- Reload the editor when prompted
JetBrains IDEs
- Go to Settings → Plugins → Marketplace
- Search for "OpenAI Codex"
- Click Install and restart the IDE
After installation, sign in with your OpenAI account when prompted.
Ghost Text — Inline Predictions
As you type, Codex predicts what you're about to write and shows it as grey "ghost text" inline:
// Start typing a function...
function calculateTax(price, taxRate) {
// Ghost text appears automatically:
// return price * (taxRate / 100);
}
To interact with ghost text:
- Tab — Accept the entire suggestion
- Esc — Dismiss the suggestion
- Ctrl+→ — Accept word by word
- Keep typing — Ghost text updates in real time
💡 Tip: Write a descriptive comment before a function, and Codex will generate the implementation based on your description.
Inline Chat — Modify Selected Code
Highlight a section of code and open the inline prompt to make targeted modifications:
How to Use
- Select the code you want to modify
- Press Cmd+I (Mac) or Ctrl+I (Windows)
- Type your instruction in the prompt bar
- Review the diff and accept or reject
Example Prompts
# Select a function, then ask:
"Add error handling with try-catch"
"Add JSDoc comments"
"Convert to TypeScript with proper types"
"Optimize this for performance"
"Add input validation"
The agent modifies only the selected code, preserving everything else in the file.
Sidebar Panel — Full Workspace Chat
Open the Codex sidebar panel for a ChatGPT-like experience with your entire workspace as context:
- Ask questions about any file in your project
- Use @ mentions to explicitly attach files — e.g.,
@database.tsor@folder/utils - Request multi-file changes that span across your codebase
- Debug errors by pasting stack traces or error messages
The sidebar maintains conversation history, so you can have an ongoing dialogue about your project as you work.
Keyboard Shortcuts Summary
| Action | Mac | Windows / Linux |
|---|---|---|
| Accept ghost text | Tab | Tab |
| Dismiss suggestion | Esc | Esc |
| Inline chat | Cmd+I | Ctrl+I |
| Open sidebar | Cmd+Shift+I | Ctrl+Shift+I |
| Accept word-by-word | Ctrl+→ | Ctrl+→ |
What's Next
In the next episode, we'll explore how Codex thinks and reasons — context gathering, chain-of-thought planning, and implementation checklists.