> ## Documentation Index
> Fetch the complete documentation index at: https://ade-app.dev/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Codex

> Run OpenAI's Codex in DAEX as a chat or as its own CLI, with your ChatGPT plan or an OpenAI API key, scoped to a lane.

Codex is OpenAI's coding agent. DAEX runs its own pinned copy of Codex for each machine, downloaded the first time it is needed, and drives it through `codex app-server`.

![The Codex CLI page in DAEX Settings › Providers](https://mintcdn.com/ade-ac1c6011/X0fzcdMoI2OYgIpA/media/current/provider-codex.jpg?fit=max\&auto=format\&n=X0fzcdMoI2OYgIpA\&q=85\&s=3d50371626274d4c8f0b27700925df10)

Codex CLI in Settings › Providers: its sign-in, status and models on this machine.

## Connect

**1. Open Settings › Providers › Codex CLI**

Pick the machine at the top. A sign-in you already have in your own `codex` CLI on that machine is reused.

**2. Sign in or add a key**

Sign in with ChatGPT (Plus, Pro or another plan that includes Codex), or add an OpenAI API key (`OPENAI_API_KEY`) in the **API keys** panel.

**3. Pick a Codex model in a chat**

The picker lists only the models your account can use.

* **Several accounts.** One machine can hold several Codex logins. Use **Add account**.
* **Another machine or the web.** When the browser cannot reach the machine running Codex, the sign-in uses a device code instead of a local callback.
* **DAEX Cloud.** Sign-ins from your computers reach your cloud computers. You can also save an OpenAI API key for DAEX Cloud on the DAEX Cloud side of **Settings › Providers**.

## Chat and CLI

| Surface | How DAEX runs it | What DAEX sees |
| - | - | - |
| **Chat** | `codex app-server` (JSON-RPC) in the lane's worktree. | Typed events: turns, tool calls, plans, subagents, approvals, token usage. |
| **CLI** | The `codex` program in a DAEX terminal. | The screen, plus Codex's own state signal (OSC 7501), so working, done, idle and "waiting on an approval" are exact. |

## Permission modes

| Mode | What it does | Chat | CLI |
| - | - | :-: | :-: |
| **Plan** | Read-only sandbox. Codex reads and answers; writes need approval. | Yes | Yes |
| **Default** | Workspace-write sandbox; asks before editing outside the workspace. | Yes | Yes |
| **Edit** | Workspace-write; trusted changes run, untrusted ones still ask. | Yes | Yes |
| **Full access** | No sandbox and no approvals. | Yes | Yes |
| **Config** | DAEX passes no flags; your `~/.codex/config.toml` decides. | Yes | Yes |

Codex has no **Auto** mode. A plan you approve in Plan moves the chat to full access. See [Permissions](https://ade-app.dev/docs/configuration/permissions.md).

## Models

The picker shows the models Codex reports for your account, with reasoning effort. Where your account offers them, **Fast** and **Ultrafast** service tiers appear on the model row once Fast mode is allowed in **Settings › Chat**.

## Troubleshooting

> [accordion] Codex is signed in, but DAEX says it is not (macOS)
>
> DAEX does not read a Codex login kept in the macOS Keychain, because reading it would prompt you. The launch explains how to switch Codex to file storage.

> [accordion] A model I expect is missing
>
> Codex lists only the models your plan includes. Older models still open saved chats but are not offered for new ones.

> [accordion] Sign-in never finishes on a remote machine
>
> Use the device-code sign-in the sheet offers, and approve the code in any browser.

> [card] [AI providers](https://ade-app.dev/docs/configuration/ai-providers.md)
>
> Sign-ins, API keys, custom providers and free models.

> [card] [Agents and models](https://ade-app.dev/docs/concepts/agents-and-models.md)
>
> All 13 agents, chats vs CLI sessions, and the model picker.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.