Episode 7 of 11

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

  1. Open the Extensions panel (Cmd+Shift+X on Mac, Ctrl+Shift+X on Windows)
  2. Search for "OpenAI Codex"
  3. Click Install
  4. Reload the editor when prompted

JetBrains IDEs

  1. Go to Settings → Plugins → Marketplace
  2. Search for "OpenAI Codex"
  3. 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

  1. Select the code you want to modify
  2. Press Cmd+I (Mac) or Ctrl+I (Windows)
  3. Type your instruction in the prompt bar
  4. 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.ts or @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

ActionMacWindows / Linux
Accept ghost textTabTab
Dismiss suggestionEscEsc
Inline chatCmd+ICtrl+I
Open sidebarCmd+Shift+ICtrl+Shift+I
Accept word-by-wordCtrl+→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.