Guilds AI / Blog

,

How to Use Codex in Cursor: Extension Setup and Workflow

Illustrative Cursor editor with the Codex extension and symbols representing setup and coding workflows.

To use Codex in Cursor, install OpenAI’s official Codex extension from the IDE Extensions panel, open the Codex sidebar, and sign in with your authorized account. This gives you a separate coding agent alongside Cursor’s native AI tools. The following setup explains how to identify the correct extension, complete a first task, and avoid mixing the two services’ usage and billing.

For Microsoft’s editor rather than Cursor, see our guide to using Codex in VS Code.

For the difference between the native Cursor workflow and a separate Anthropic coding agent, see our Cursor vs Claude Code comparison.

If you are still deciding between the native Cursor agent and the Codex extension, our Codex vs Cursor comparison explains the workflows and billing differences.

Choose the right way to use OpenAI in Cursor

Cursor is a code editor with its own AI features. OpenAI’s Codex extension provides a separate coding-agent interface inside that editor. Installing the extension does not automatically make Codex the model behind Cursor’s native Agent or autocomplete features.

OpenAI’s Help Center distinguishes three ways of accessing its models in Cursor: the official Codex extension, a supported bring-your-own API key arrangement, and an approved AI gateway. Choose the extension when you specifically want the Codex agent and its own workflow. The other methods concern model access through separately configured integrations.

Review the account and usage terms for the selected method. A Cursor subscription is not the same as a ChatGPT plan or an OpenAI API billing account. Do not assume that a model shown in one interface is included in the other service’s allowance.

Step 1: Install the official Codex extension

Open Cursor’s IDE view and open Extensions using Command+Shift+X on macOS or Ctrl+Shift+X on Windows and Linux. Search for Codex and confirm that OpenAI is the publisher. The official extension identifier is openai.chatgpt. Select Install and allow the installation to complete.

Do not confuse the IDE Extensions panel with Cursor’s agent plugin marketplace. A Cursor community support thread from June 2026 documents this distinction and a Nightly-edition deep-link problem: the extension link opened the stable editor instead. Searching from the Extensions panel of the intended installation avoids that particular problem.

Make sure the extension is enabled in the active profile and workspace. If you work through a remote development environment, verify the extension’s location and supported installation configuration before sharing repository access.

Step 2: Open Codex and sign in

Select the Codex icon in the editor. If it is hidden, open the Command Palette with Command+Shift+P or Ctrl+Shift+P, search for Codex: Open Codex Sidebar, and select the command. OpenAI’s IDE quickstart explicitly includes Cursor among the supported compatible editors.

Complete the extension’s authorized sign-in flow using the account you intend to use. If API authentication is offered and appropriate, use an authorized project credential and confirm the associated billing and limits. Never enter a secret into a lookalike extension, repository file or shared prompt.

Open a project and make sure the extension can see the intended workspace. For unfamiliar repositories, restrict permissions and inspect the repository before allowing any commands or edits.

Step 3: Try a reviewable first coding task

Start with a small read-only request. For example, if a Python project has a validation module, open that file, select the relevant function, and ask Codex to explain what it does and which tests cover it. OpenAI’s extension supports using editor context in a conversation.

Inspect the selected validator and its tests. Explain how empty input is handled. Propose one minimal regression test. Do not modify files or install packages until I approve the plan.

Review the proposed test. If the scope is appropriate, authorize only the necessary changes. Inspect the resulting diff, run the existing test suite independently and make sure the agent has not changed dependencies or unrelated components.

This is an illustrative prompt, not a recorded authenticated Codex session. Our guide to how Codex works as an agent explains its tool-use loop and why a passing test does not prove all changes are correct.

How to use Codex and Cursor together

You can keep Cursor as your editor while using Codex for a focused task in its sidebar. Cursor’s own chat and inline completion tools remain separate surfaces. For instance, use the editor to navigate a function and use Codex to examine its tests. A larger task can be delegated to Codex cloud when the extension supports that workflow and the repository is authorized for it.

Do not let two agents edit the same file at the same time. Unreviewed simultaneous edits can conflict or invalidate test results. Create a Git checkpoint before a task, use a separate branch or worktree for concurrent work, and inspect each diff before combining changes. Our Codex AGENTS.md guide explains how to document project conventions and test commands for Codex.

If you also use Anthropic’s editor agent, compare the interfaces without assuming they share settings or subscriptions. See our Claude Code in VS Code guide for a separate extension workflow.

Why Codex is not working in Cursor

Cannot find the extension: Open the Extensions view in the IDE rather than the agent marketplace. Search by publisher or identifier and check that your editor version supports it.

Installed but no panel: Try the Codex sidebar command in the Command Palette. Confirm the extension is enabled, and reload the editor window if needed.

Sign-in fails: Verify the active account, authorized access, network connection and applicable organizational policy. A failed subscription login does not mean you should create a paid API account.

Codex cannot use a Cursor tool: Separate extensions do not automatically share every tool, configuration or MCP connection. Check which tools are available to the Codex session and configure only those authorized for it.

Unexpected usage: Check the service and credential selected before retrying. Avoid sending test requests through multiple accounts if the purpose is to identify which service is charging them.

Frequently asked questions

Do I need to install the Codex CLI separately? Not merely to use the official IDE extension. The standalone command-line interface is a separate installation and workflow.

Can I use my ChatGPT account with Codex in Cursor? The official extension offers account sign-in. Availability and usage depend on the current account and service terms.

Does the Codex extension replace Cursor Agent? No. It opens a separate agent interface; it does not automatically change the model used by Cursor’s own features.

Can I use Codex with a free Cursor account? Installing the extension and obtaining authorized Codex access are distinct. Check the current editor and Codex account requirements rather than assuming unlimited free model usage.

Was the setup tested directly? This guide was reviewed against OpenAI’s IDE quickstart, Help Center search extract, DataCamp’s comparison and Cursor community support information on December 4, 2026. No authenticated extension session was executed.