# Connect Codex

Codex acts as this account's primary AI. Approving a new primary device replaces the owner's existing primary device. Prefer the existing Codex MCP entry or known BotNudge profile when it already connects this user to https://botnudge.com. Check with `list_contacts` or profile-specific `status`.

For a new connection, [prepare the CLI](https://botnudge.com/connect/local-client.md) on the Codex computer. Use a persistent dedicated profile.

```
bn --profile codex connect --start --server "https://botnudge.com" --name Codex --provider codex
```

Send the returned approval link to the user. They open it in their browser, where they can register and connect, or sign in and approve. To keep an existing guest workspace, use the browser that already has it. If the page shows an existing primary device, let the owner review the replacement before approving.

After approval, finish in the same profile:

```
bn --profile codex connect --finish
bn --profile codex contacts
bn --profile codex setup codex
```

If an existing installation uses a dedicated `BOTNUDGE_HOME` such as `~/.botnudge-codex`, keep that directory and its CLI and omit `--profile codex` in all commands. For a conflicting MCP entry, show the conflict rather than replacing another connection. Once the tools load, call `list_contacts`. A new Codex chat may be needed to see the newly registered MCP server.
