Primary navigation

Codex IDE extension

Build with the context already in your editor

Work with Codex beside your code. Bring open files and selections into the prompt, review edits in place, and hand off longer work without breaking your flow.

1import { wait } from './backoff';
2
3export async function retryOperation<T>(
4 fn: () => Promise<T>,
5 retries = 3,
6): Promise<T> {
7 let attempt = 0;
8 let lastError: unknown;
9
10 while (attempt <= retries) {
11 try {
12 return await fn();
13 } catch (error) {
14 lastError = error;
15 if (attempt >= retries) break;
16 await wait(200 * 2 ** attempt);
17 attempt++;
18 }
19 }
20 throw lastError;
21}
CODEX

Trace and fix a flaky retry bug

Fixed successfully. Retry loop now stops at max retries before waiting.

The retry guard now runs before the wait, so exhausted retries stop immediately while successful attempts keep the same behavior.

Validation passed:

  • Retry exhaustion stops after the configured attempt count.
  • Backoff still runs between retryable attempts.
  • Focused retry tests pass.

Updated retry.ts without changing the editor integration.

Edited retry.ts+22
retry.ts+22Review
main 0 problemsLn 16, Col 1

Trace and fix a flaky retry bug. Retry loop now stops at max retries before waiting. Changes applied.

01

Use the context already open

Reference open files, selected code, and recent threads directly from the composer. Codex starts with the code you are already looking at, so you spend less time restating the problem.

02

Review changes beside your code

Read the summary, inspect a focused diff, and follow up in the same thread. Keep only the changes you want while the source and rationale stay visible together.

03

Delegate when the task grows

Keep quick iterations local, or connect Codex web when a task needs more time and room. Return to a reviewable result from the same editor workflow.

Quickstart

Get started in your IDE

Install or enable Codex, sign in, and start a task with the context already open in your editor.

  1. Install or enable Codex

    Choose your IDE. VS Code and compatible editors use the Codex extension; Xcode and JetBrains IDEs provide their own integrations.

  2. Open Codex

    VS Code, Cursor, or Windsurf: choose the Codex icon. If it is not visible, open the Command Palette and run Codex: Open Codex Sidebar.

    Xcode: open the coding assistant, start a new conversation, and choose Codex as the agent.

    JetBrains IDEs: open AI Chat and select Codex.

  3. Start your first task

    Open a project and ask Codex to explain the codebase, make a focused change, or help you debug an issue. Create Git checkpoints before and after a task so you can revert changes.

    Read the best practices

See what Codex can do in your IDE

Stay close to the code while Codex explains, edits, reviews, and delegates.

01

Use the context already open

Add an open file, a selection, or a recent thread to the composer, then ask Codex to explain or edit the code with that context already attached.

Learn more
02

Review changes beside your code

Review a concise summary and the changed lines without an extra navigation pane. Inspect the two affected files, keep the edits you want, and ask for a follow-up from the same view.

Learn more
A Codex change ready to review in an IDE
03

Delegate when the task gets bigger

Choose local work for fast, hands-on iteration, or connect Codex web to delegate a longer task. The thread stays available when you return to review the result.

Learn more

Use Codex IDE extension when…

You are making focused edits

Keep the relevant files and Codex in the same view.

You are learning unfamiliar code

Ask about the files and symbols already open in the editor.

You want to review changes in place

Inspect and apply edits alongside the source.

You want to delegate a larger task

Start cloud work from the IDE and return to the result.