# Codex

Codex contacts run the `codex` installed on your computer, with the same login, `config.toml`, `AGENTS.md`, hooks and MCP servers.

**Set it up.** Install the [Codex CLI](https://github.com/openai/codex) and log in:

```bash
npm install -g @openai/codex
codex login
```

It isn't bundled, because its binary is over 300 MB. The app finds `codex` on your `PATH`; set `BUDDYLIST_CODEX_CLI` to use a different one.

**Add a contact.** Pick **Codex** as the **Service** in **Add a Contact**.

You get the same windows as with Claude:

- streamed replies
- a line for each command, file change, web search and MCP tool call
- Accept / Always allow / Decline invitations
- Nudge to stop
- conversations that pick up where they left off
- suggested reply buttons after questions, using Codex's quick model (controlled by **Suggest replies** in Settings)

Codex has its own **Mode** menu:

| Mode                           | Codex asks before...                                    | Its commands can write... |
| ------------------------------ | ------------------------------------------------------- | ------------------------- |
| Ask before acting              | every file change, and most commands                    | inside the folder         |
| Work freely inside this folder | leaving the folder or using the network                 | inside the folder         |
| Read only                      | changing anything                                       | nowhere                   |
| Never ask                      | nothing. Only use it in folders you don't mind breaking | anywhere                  |

Good to know:

- A message you send while Codex works joins what it is doing, and Codex reads it at its next step. One sent during `/compact` or `/review` is turned down.
- A new mode, model or effort level applies from the next message you send once Codex is done. **Never ask** also stops the asking straight away, while Codex is still working.
- **Always allow** lasts until you quit the app or start a new chat.
- **Activities** has `/compact`, `/review` and your Codex skills. `/review` looks at your uncommitted changes; say what else to look at after it (`/review the last commit`).
- A review never asks before it runs a command, and a mode you just picked only applies to it after your next message.
- Codex has no plan approval here.
- It doesn't report what a reply cost.

**In a contact's worktree** Codex trusts nothing of the folder, whatever your `config.toml` says. A worktree's branch can be someone else's pull request, and in a folder it trusts Codex starts the MCP servers in the branch's `.codex/config.toml` without asking. So a project's `.codex/config.toml` doesn't apply there. Put what you need in `~/.codex/config.toml`. Codex skips the worktree's `AGENTS.md` too, so the app reads it and passes it on.
