Agentcode

Codex in Cursor: can you use Codex in Cursor, and how do you set it up?

Aug 13, 2026 · 7 min read · By Marcus Lee, Engineering

Agent Run

Pick a task

Plan

  • planning

Files changed

Test run

0 failed

Pull request

Open

You review and merge. Agentcode never merges on its own.

Yes. OpenAI's own IDE documentation lists Cursor alongside VS Code, Windsurf, Xcode and JetBrains as a supported target for the Codex extension, and ships a Cursor-specific install link for it. The extension, published under the identifier openai.chatgpt, is also on Open VSX, which is the registry Cursor's marketplace actually pulls from, so it appears in Cursor's Extensions panel when you search for Codex. You sign in with the ChatGPT account you already pay for. Nothing about this is a workaround.

The reason people ask is usually financial rather than technical. You already pay OpenAI $20 a month, Cursor wants another $20, and before you hand over the second subscription you want to know whether the first one can just live inside the second. It can. Whether it should is a separate question, and the answer depends on something most write-ups skip: what running Codex inside Cursor does to each product's usage meter.

Can you use Codex in Cursor?

Yes, and it is documented rather than tolerated. OpenAI's IDE page gives install links for Visual Studio Code, Cursor, Windsurf, VS Code Insiders, Xcode and JetBrains, with the Cursor entry pointing at a cursor: protocol handler that opens the editor straight to the extension. Once it is installed you open it with the Codex icon in the sidebar, or by running Codex: Open Codex Sidebar from the Command Palette if the icon is not showing.

The reason this works at all is that Cursor is a fork of VS Code, so a VS Code extension is the right shape for it. The reason it is worth checking rather than assuming is that Cursor does not use the Microsoft Marketplace. Its extension search and downloads go through Cursor's own proxy in front of Open VSX, with automated malware and supply-chain analysis in between. Plenty of Microsoft-only extensions are simply absent from that registry. Codex is not one of them: OpenAI publishes it there too.

How do you use Codex in Cursor?

Four steps, and none of them involve editing a settings file.

  1. Open the Extensions panel in Cursor with Cmd or Ctrl, Shift and X.
  2. Search for Codex and install the one whose publisher is OpenAI. Check that, because Cursor's own documentation warns that the same publisher.extension identifier can point to different publishers on Open VSX than on the Microsoft Marketplace. Treat an extension ID the way you treat a dependency.
  3. Sign in with your ChatGPT account. Your existing plan carries over, so a Plus subscriber gets Plus limits and a Business workspace member gets Business ones.
  4. Open the Codex sidebar and give it a task with a file open, so it starts from the code you are already looking at rather than from a blank prompt.

There is a second route that sidesteps the extension registry entirely and that I would reach for on a locked-down machine. Codex also ships as a CLI, installed on macOS and Linux with curl -fsSL https://chatgpt.com/codex/install.sh | sh, and Cursor has an integrated terminal like any other editor. Run it there and you get the same agent, the same account, the same limits, plus codex exec for scripted and CI work. No registry involved.

Can you use your Codex subscription in Cursor?

Yes, and this is the part that makes the whole arrangement worth doing. Signing in to the extension authenticates against your ChatGPT plan, so you are spending the allowance you already bought rather than buying a second one. If you are on the free ChatGPT plan you get the free Codex allowance inside Cursor. If you are on Plus you get Plus limits. A Business workspace seat brings its admin controls and data settings with it.

The alternative sign-in is an API key, which bills per token against your OpenAI API account instead of against a plan. That is the right choice for shared environments and CI, and the wrong one for daily editing, because a plan gives you a fixed ceiling and an API key gives you an open tab.

Does running Codex in Cursor use Cursor's usage allowance?

No, and this is the single most useful thing to understand about the setup. The two meters are entirely separate and never touch.

What you runWhich meter it spendsHow that meter is measured
Cursor Agent, Tab, ComposerCursor's included model usageA dollar allowance per month: $20 on Pro, $70 on Pro Plus, $400 on Ultra, then on-demand billing in arrears
Codex extension in CursorYour ChatGPT planA rolling five hour window counted in messages per model, with weekly limits on top
Codex CLI with a plan loginYour ChatGPT plan, same windowShared with the extension and with ChatGPT itself
Codex CLI with an API keyYour OpenAI API accountPer token at API prices, no ceiling

So a developer paying $20 for Cursor Pro and $20 for ChatGPT Plus is not paying twice for one thing. They have two independent pools, and when one runs dry the other is untouched. Compare that with spending the same $40 on a single vendor: Cursor Pro Plus is $60 for roughly three times the Pro agent limits, and the middle Codex tier is $100 for five times Plus. Two $20 subscriptions is the cheapest way to have headroom left when a five hour window closes on you mid task. We worked through the rest of that arithmetic in Codex vs Cursor.

Should you use Codex in Cursor, or pick one?

Run both if the two things you want are autocomplete and a second opinion. Cursor Tab is a genuinely different product from any agent, it fires while you type, and Codex has no equivalent. Meanwhile Codex brings OpenAI's newest coding models and its cloud side, including automatic code review and the Slack integration, into the same window. Those do not overlap, so paying for both buys two things rather than one thing twice.

Pick one if you can name which one you actually use. The honest failure mode here is subscription drift: two tools installed, one used, both billed, nobody cancels. Give it a month, look at which sidebar you opened, and cancel the other. If you are the person who has to justify tool spend, our guide to budgeting for AI coding tools lays out how to turn that into a defensible number.

There is also a governance angle that engineering managers hit later than they should. Two agents from two vendors reading the same private repository means two vendors in scope for your security review, two sets of data-retention terms, and two answers to give when someone asks where your source code has been. That is not a reason to avoid it, but it is a reason to write both down and map them into your control evidence before the next audit, rather than during it. If code privacy is the sticking point, we covered what these tools actually do with your code separately.

Can you run Codex in Cursor on a work machine?

Usually, with two things to check first. Cursor's extension proxy is the gate on the extension route, so if your organization restricts which extensions can be installed, the Codex extension needs to be on the allowed list. And a ChatGPT Business or Enterprise workspace can restrict where Codex may be used, so the account side may need an admin to sign off. If either blocks you, the CLI route through the integrated terminal is a separate path with separate controls and is often the one that clears.

What you get, and what you do not

What you get is real: OpenAI's models and its agent inside an editor built for agent work, without giving up Tab, and without spending Cursor's dollar allowance to do it. Editor context carries over, so you can reference open files and selections in the Codex composer, review a focused diff in place, and hand a longer task to Codex web when it grows past what you want to sit through.

What you do not get is any escape from the thing both products share. Both meter you. Cursor drains a dollar allowance and then bills in arrears; Codex drains a five hour window that it shares with ChatGPT itself, so a long research conversation in the morning can be why the agent stops in the afternoon. Running both widens the runway. It does not change the road.

That is the gap we built Agentcode for. You describe a task, it plans, edits the files, runs your test suite, and opens a reviewable pull request on the GitHub or GitLab repository you already have, and it never merges on its own. The bill is $29 a month, flat, with no allowance to run down and no window to wait out. It is not an editor and it will not finish your line as you type, so it sits next to Cursor rather than replacing it. If you want the wider field first, start with the best AI for coding, or read Codex vs Claude Code for the other half of the OpenAI comparison. The same sign-in question comes up on GitHub's side too, and the answer there is stranger: GitHub bills the Codex VS Code extension as a Copilot feature, so a Pro+ seat already pays for it, which is covered in Codex VSCode extension pricing alongside Codex vs Copilot.

Try the demo

Watch the agent plan, edit, run tests, and open a pull request you review and merge.

No card to start · Review-first: the agent never merges