# How to use Codex in Xcode: setup, plans and fixes

> Codex needs Xcode 26.4 or later and a ChatGPT sign-in. The setup steps, what each plan gets, and the fixes Apple and OpenAI give when sign-in fails.

URL: https://claudegpt.si/news/codex-in-xcode-how-to-use  
Published: 2026-11-23T02:59:00.909Z  
Author: ClaudeGPT Si Newsroom  
Section: Guides  
Topics: OpenAI, Codex, Apple, How to, Coding agents  
Publisher: ClaudeGPT Si

## Key takeaways

- Codex is set up in Xcode > Settings > Intelligence: click Get next to Codex under Agents, install it, then sign in with ChatGPT from the Account row.
- Apple stopped Codex in Xcode 26.3 on May 8, 2026, so you need Xcode 26.4 or later; Xcode 27.2 requires an Apple silicon Mac on macOS Tahoe 26.6 or later.
- For sign-in failures, Apple and OpenAI staff suggest updating Xcode and the Codex agent, trying device code sign-in, and running xcrun agent codex logout before signing in again.

To use Codex in Xcode, open Xcode > Settings > Intelligence, click Get next to Codex under Agents, install it, then sign in with your ChatGPT account from the Account row. After that you pick Codex in the coding assistant (Command-0) and start a conversation. You need Xcode 26.4 or later: Apple stopped Codex in Xcode 26.3 on May 8, 2026, and the current release, [Xcode 27.2](https://developer.apple.com/documentation/xcode-release-notes/xcode-27_2-release-notes), requires an Apple silicon Mac on macOS Tahoe 26.6 or later.

Codex is OpenAI's coding agent. Inside Xcode it can read your project, edit files, build, run tests and check its work in Xcode Previews and the Simulator. The setup steps below come from Apple's [Setting up coding intelligence](https://developer.apple.com/documentation/xcode/setting-up-coding-intelligence) page and OpenAI's Codex docs, and the fixes from Apple's release notes and replies from Apple and OpenAI staff. All of it was checked on November 23, 2026.

## What you need before you start

| Requirement | What the docs say |
| --- | --- |
| Xcode version | 26.4 or later. Codex first shipped in Xcode 26.3 in February 2026, but Apple says it no longer works there from May 8, 2026. |
| Mac and macOS | Xcode 26.4 to 26.6 need macOS Tahoe 26.2 or later. Xcode 27, 27.1 and 27.2 need macOS Tahoe 26.6 or later and run only on Apple silicon Macs. |
| Account | A ChatGPT account. OpenAI's help center says Codex is included in all ChatGPT plans, Free and Go included. |
| Project location | Somewhere Xcode's agents can reach. See the Desktop, Documents and Downloads fix below. |
| Git (optional) | The coding assistant's History rollback only works when the project has a Git repository. |

Apple introduced agentic coding, with Codex and Anthropic's Claude Agent, in [Xcode 26.3 on February 3, 2026](https://www.apple.com/newsroom/2026/02/xcode-26-point-3-unlocks-the-power-of-agentic-coding/). In May, an Apple engineer posted on the developer forums that "Codex will no longer be available in Xcode 26.3 starting on Friday, May 8th." If Codex shows as Unavailable in your settings, an old Xcode is the first thing to check.

## How to set up Codex in Xcode

These steps follow Apple's setup page. Menu names are Apple's.

1. Open Xcode and choose **Xcode > Settings**, then select **Intelligence** in the sidebar. You can also click **Get Started with Agents** in the coding assistant sidebar.
2. Under **Agents**, click **Get** next to Codex.
3. In the dialog that appears, click **Install**. Xcode downloads the agent and updates it automatically after that when it can.
4. To sign in, click the **More** button (...) in the **Account** row of the Codex settings.
5. Follow the sheets and the browser window that opens to sign in with your ChatGPT credentials. OpenAI's [authentication docs](https://developers.openai.com/codex/auth) explain that the browser hands your credentials back to Codex once you sign in.
6. Open the coding assistant with the **Coding Assistant** button above the navigator, or press **Command-0**. Click **New Conversation** and choose Codex from the pop-up menu if you have more than one agent set up.

OpenAI's own [IDE quickstart](https://developers.openai.com/codex/ide) says the same for Xcode: "open the coding assistant, start a new chat, and choose Codex as the agent."

Codex sits under **Agents**, which is a different row from **ChatGPT in Xcode** under **Chat**. ChatGPT in Xcode is the chat assistant Apple added in Xcode 26, and it works with or without an account. Codex is the agent that can act on your project.

## How to use Codex once it is running

Type a prompt in the message field at the bottom of the transcript. A few things from [Apple's guide to the coding assistant](https://developer.apple.com/documentation/xcode/writing-code-with-intelligence-in-xcode) make it more useful:

- Type `@` to point Codex at a specific file or symbol. Use the Attachments menu to add other files.
- Switch models from the **Model** pop-up menu in the lower-left corner of the message field.
- Start a prompt with `/plan` to get plan mode. Codex proposes changes in the artifacts pane instead of editing your code, and you approve them with **Yes** in the "Implement the plan?" bar. Type `/exit-plan` to leave it.
- Type `/` to see the skills Xcode includes, such as localization.
- Every file Codex changes shows up in the artifacts pane with change bars. To undo a whole step, choose **History** from the Adjust Editor Options menu, move the slider and click **Restore**.

What Codex can do depends on your Xcode version. Apple's [Xcode 27 release notes](https://developer.apple.com/documentation/xcode-release-notes/xcode-27-release-notes) say agents can now boot simulators, install and launch apps, tap through the UI and take screenshots, work the debugger, change build settings and entitlements, and read your app's crash, hang and energy reports. Xcode 27.2 adds a JSON project format (`.xcproj`) that Apple says is easier for coding agents to edit.

When Codex wants to run a command-line tool, Xcode may ask you first. You can review or remove what you allowed later under **Permissions** in the Intelligence settings.

## How to customize Codex in Xcode

Codex in Xcode reads its configuration from a folder that only Xcode uses. Apple's [guide to customizing agents](https://developer.apple.com/documentation/xcode/extending-and-customizing-agents) says to put Codex configuration files, such as a default model, extra MCP servers or your own skills, in this folder:

```
~/Library/Developer/Xcode/CodingAssistant/codex
```

MCP, the Model Context Protocol, is the open standard agents use to call outside tools. Those files only affect Codex when Xcode launches it. You can also add plug-ins, which bundle skills, MCP servers and agents, from the **Plug-ins** row under Agents in Xcode.

## How to use the Codex app or CLI with Xcode instead

If you prefer to run Codex in Terminal or in the ChatGPT desktop app, Xcode can lend it its tools through MCP. Apple documents this in [Giving external agents access to Xcode](https://developer.apple.com/documentation/xcode/giving-external-agents-access-to-xcode):

1. In **Xcode > Settings > Intelligence**, under **Model Context Protocol**, set **Allow External Agents to Use Xcode Tools** to **Always** or **While Xcode is Open**.
2. In Terminal, add Xcode as an MCP server for Codex:

```bash
codex mcp add xcode -- xcrun mcpbridge
```

3. Check it with `codex mcp list`.
4. Open your project in Xcode before you prompt Codex.

Xcode shows an alert when an outside agent connects. You can add notes about your project in an `AGENTS.md` file for the agent to read. These commands need a Mac with Xcode, so they were not run for this guide.

## Codex not working in Xcode: the documented fixes

Most "codex not working in xcode" reports are sign-in failures. These are the fixes Apple and OpenAI have published, in the order to try them.

### Codex shows as Unavailable

Update Xcode. An Apple product manager's accepted answer on the developer forums to a user on Xcode 26.3 was: "Please upgrade to Xcode 26.4 or later to continue using Codex."

### Sign-in finishes in the browser, but Xcode still shows you signed out

1. Update Xcode and its Codex agent, then sign in again under **Settings > Intelligence > Codex**. That was OpenAI support's advice in its developer forum on September 21, 2026, after reports that sign-in worked again on Xcode 27.
2. If that option shows, try **Sign In With a ChatGPT Device Code**, which OpenAI support also suggested. OpenAI's docs for the Codex CLI say device code sign-in has to be turned on first in your ChatGPT security settings, or by your workspace admin.
3. After a failed attempt, run this in Terminal, then sign in again. An Apple developer tools engineer suggested it in June 2026, while OpenAI worked on a fix in Codex:

```bash
xcrun agent codex logout
```

4. Turn off any VPN or proxy and clear Xcode's cache, as an Apple developer relations engineer suggested in the same thread:

```bash
rm -rf ~/Library/Caches/com.apple.dt.Xcode
```

If none of this works, file a report in Feedback Assistant. Apple's engineers asked affected users to do that in the thread.

### Codex can't open a project in Desktop, Documents or Downloads

Apple's [Xcode 26.3 release notes](https://developer.apple.com/documentation/xcode-release-notes/xcode-26_3-release-notes) list a known issue: if you deny Codex access to a project in one of those folders, macOS doesn't ask again. Turn access back on in **System Settings > Privacy & Security > Files and Folders**. If Codex isn't listed there, move the project to another folder.

### A setting you changed is ignored

The same notes say some agent settings, such as telemetry or the internet tools switch, may not apply right away. Relaunch Xcode.

### A skill is rejected when you call it with a slash

Ask for it by name instead, as Apple's notes suggest: "use the `{skill-name}` skill".

### The coding assistant is missing on a work Mac

Apple's setup page says an admin can turn the coding assistant off with the `CodingAssistantAllowExternalIntegrations` key in a device management profile. Ask your IT team.

## What Codex in Xcode costs

Apple doesn't charge for the integration, but its announcement notes that OpenAI's terms apply. Usage counts against your ChatGPT plan. OpenAI's [help center](https://help.openai.com/en/articles/11369540-using-codex-with-your-chatgpt-plan) says Codex is in every ChatGPT plan, Free and Go included, with limits that vary by plan. OpenAI's [Codex pricing page](https://developers.openai.com/codex/pricing) is narrower: it lists Free and Go for the desktop app only, "subject to rollout," and lists the IDE extension from Plus up.

| Plan | Price (as of November 23, 2026) | What OpenAI's Codex pricing page lists |
| --- | --- | --- |
| Free | $0 | GPT-6 Luna in the desktop app, subject to rollout |
| Go | $8 a month | GPT-6 Luna in the desktop app, subject to rollout |
| Plus | $20 a month | Codex on the web, CLI, IDE extension and iOS, GPT-6.1 Sol and GPT-6 Luna, extra credits |
| Pro | $100, $200 or $500 a month | Everything in Plus, and Ultrafast mode on the $500 plan |
| Business | $20 per user a month billed yearly, $25 monthly | Codex across apps, admin controls, credits |
| API key | Pay per token | Codex in the CLI, SDK or IDE extension at API prices |

Neither page names Xcode. So if you're on Free or Go and Codex in Xcode won't take your requests, a paid plan is the safer bet.

For how the Codex agent differs from ChatGPT itself, see [ChatGPT vs Codex](https://claudegpt.si/news/chatgpt-vs-codex).

## Frequently asked questions

### Is Codex in Xcode free?

Apple doesn't charge for the integration, and OpenAI's help center says Codex is included in every ChatGPT plan, Free and Go included. OpenAI's Codex pricing page lists IDE use from the $20 Plus plan up, so a paid plan is the safer choice.

### Does Codex work in Xcode 26.3?

Not anymore. Apple said Codex would stop working in Xcode 26.3 on May 8, 2026, and asks developers to upgrade to Xcode 26.4 or later.

### Why is Codex not working in Xcode?

Most reports are sign-ins that finish in the browser while Xcode still says Not Signed In. Update Xcode and the Codex agent, sign in again under Settings > Intelligence > Codex, and if that fails run xcrun agent codex logout and try again.

### How do I connect the Codex app or CLI to Xcode with MCP?

In Xcode's Intelligence settings, set Allow External Agents to Use Xcode Tools to Always or While Xcode is Open. Then run codex mcp add xcode -- xcrun mcpbridge in Terminal and keep your project open in Xcode.

## Sources

- [Setting up coding intelligence](https://developer.apple.com/documentation/xcode/setting-up-coding-intelligence), Apple
- [Writing code with intelligence in Xcode](https://developer.apple.com/documentation/xcode/writing-code-with-intelligence-in-xcode), Apple
- [Extending and customizing agents](https://developer.apple.com/documentation/xcode/extending-and-customizing-agents), Apple
- [Giving external agents access to Xcode](https://developer.apple.com/documentation/xcode/giving-external-agents-access-to-xcode), Apple
- [Xcode 26.3 Release Notes](https://developer.apple.com/documentation/xcode-release-notes/xcode-26_3-release-notes), Apple
- [Xcode 26.4 Release Notes](https://developer.apple.com/documentation/xcode-release-notes/xcode-26_4-release-notes), Apple
- [Xcode 27 Release Notes](https://developer.apple.com/documentation/xcode-release-notes/xcode-27-release-notes), Apple
- [Xcode 27.2 Release Notes](https://developer.apple.com/documentation/xcode-release-notes/xcode-27_2-release-notes), Apple
- [Xcode 26.3 unlocks the power of agentic coding](https://www.apple.com/newsroom/2026/02/xcode-26-point-3-unlocks-the-power-of-agentic-coding/), Apple
- [Please upgrade Xcode to continue using Codex](https://developer.apple.com/forums/thread/825799), Apple Developer Forums
- [Codex Unavailable in Xcode 26.3 Despite Apple Intelligence Being Enabled](https://developer.apple.com/forums/thread/854664), Apple Developer Forums
- [Agents in Xcode: Codex Sign In not working](https://developer.apple.com/forums/thread/825837), Apple Developer Forums
- [Codex IDE extension](https://developers.openai.com/codex/ide), OpenAI
- [Codex authentication](https://developers.openai.com/codex/auth), OpenAI
- [Codex pricing](https://developers.openai.com/codex/pricing), OpenAI
- [Using Codex with your ChatGPT plan](https://help.openai.com/en/articles/11369540-using-codex-with-your-chatgpt-plan), OpenAI
- [Xcode/Codex - Your request couldn't be completed](https://community.openai.com/t/xcode-codex-your-request-couldnt-be-completed/1382827), OpenAI Developer Community
