# Build with your ChatGPT plan

Source: https://layerwise.app/docs/build-your-app/codex

Connect Codex to Layerwise and build with your ChatGPT plan's Codex usage instead of Layerwise credits.

If your ChatGPT plan includes Codex, you can use it to build in Layerwise. **My Codex** chats run on the Codex installed on the computer and draw on its ChatGPT plan instead of the team's Layerwise credits. Any chat can switch between Layerwise, My Codex, and [My Claude](/docs/build-your-app/claude) at any time.

My Codex works on every Layerwise plan.

## Before you start [#before-you-start]

- Install the ChatGPT app or the Codex CLI on your computer.
- Sign in to Codex with your ChatGPT account or an OpenAI API key. With an API key, OpenAI bills your API account for usage.

## Connect Codex [#connect-codex]

1. Open **Account** from the user menu and find the **My Codex** card.
2. Choose **Connect**.

Layerwise uses your existing Codex sign-in, so there's nothing else to log in to. The card then shows **Connected**, the signed-in account, and its plan. If Codex isn't installed, choose **Install** on the card. Once it's installed, come back to Layerwise and choose **Connect**. If Codex isn't signed in, the card says what to fix. Fix it, then choose **Connect** again.

The connection is saved for you on this device. Each teammate connects their own Codex account, and no one can build with another member's account.

To see which Codex Layerwise found, its version, and how it signs in, open the card's menu and choose **Connection details**.

## Build with My Codex [#build-with-my-codex]

1. When you create a project or start a chat, open the model picker.
2. Under **Agent**, choose **My Codex**.
3. Choose a **Model** and an **Effort** level. The list comes from the Codex account.

Layerwise remembers your choice for new projects and chats. A My Codex chat has the same project tools, preview, skills, MCP servers, and permission modes as any other chat. If you change the model or effort while a task is running, the change applies to the next message.

## Codex skills and MCP servers [#codex-skills-and-mcp-servers]

My Codex chats can also use personal Codex skills, the skills that come with Codex, and the MCP servers in the Codex `config.toml`, along with [Layerwise skills and MCP servers](/docs/build-your-app/skills-and-mcp). When a personal skill shares a name with a Layerwise or project skill, the chat uses the Layerwise or project skill.

To see what My Codex uses, open the **My Codex** card's menu and choose **Skills** or **MCP servers**. To turn one off for Layerwise chats, use its switch. The change applies from the chat's next message. To add, edit, or remove skills and servers, use Codex. Layerwise never edits Codex settings or files.

Codex plugins and hooks stay off in Layerwise chats, and so do MCP servers that a project's own `.codex/config.toml` defines.

## Switch a chat's agent [#switch-a-chats-agent]

A chat can move between Layerwise, My Codex, and My Claude at any time. For example, switch to My Codex when the team's credits run out, or to another agent when a Codex limit is reached.

1. Open the chat's model picker.
2. Under **Agent**, choose the agent you want.

The chat keeps its history, and the new agent picks up where the conversation left off. It starts with that agent's default model, which you can change in the same picker. The first message after a switch takes a little longer while the new agent reads the chat's history.

Switching happens between messages. Wait for any running task to finish, and send or clear any queued messages. If the chat has an unfinished goal, clear it first.

## Usage and limits [#usage-and-limits]

- **Credits** — My Codex chats don't use Layerwise credits and don't appear in Usage. See [Manage billing and usage](/docs/account/billing-and-usage).
- **Codex usage** — With a ChatGPT sign-in, the **My Codex** card shows how much of each Codex limit is left and how long until it resets. When a limit is reached, wait for the reset or switch the chat to Layerwise.
- **Plan limits** — Your Layerwise plan's daily message limit and project limit still apply. On Free, that's 10 messages a day across all chats.

## Privacy [#privacy]

- Codex sends model requests from your computer directly to OpenAI. Your Codex sign-in stays on your computer.
- Codex plugins and hooks stay off in Layerwise chats, and Layerwise doesn't change Codex settings.
- Like any Layerwise chat, a My Codex chat's history is saved with the project and syncs across devices, so project members can read it.
- Codex names new projects and chats from the first message.

## Troubleshooting [#troubleshooting]

| Problem                                   | What to do                                                                                                                                      |
| ----------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- |
| Codex isn't installed or found            | Choose **Install** on the **My Codex** card. Once it's installed, come back to Layerwise and choose **Connect**.                                |
| Codex isn't signed in                     | Sign in to Codex with your ChatGPT account or an OpenAI API key, then check again.                                                              |
| The Codex version isn't supported         | Open **Connection details** to see the version Layerwise found. Update the ChatGPT app or the Codex CLI, then check again.                      |
| The Codex account reached its usage limit | Check the reset time on the **My Codex** card, or switch the chat to Layerwise.                                                                 |
| The Codex account can't use the model     | Choose another Codex model.                                                                                                                     |
| A Codex MCP server doesn't work           | Check that it works in Codex. If it needs you to sign in, sign in from Codex, then start a new chat.                                            |
| The Codex account for this chat changed   | Stop any running task, then choose **Reconnect My Codex** in the chat. The chat's history stays, and the next message uses the current account. |
