Features · Updated Jun 4, 2026 · 9 min read

Codex auth and relay

Sign in to Codex on your Mac, connect supported ChatGPT models in Lerix, and enable Codex Relay for other signed-in Lerix clients on the same Pro account.

Codex auth is available only in the Lerix Mac app. Sign in to Codex on that Mac, then connect supported ChatGPT/OpenAI models from Settings > Connections. With a Pro account, that Mac can also relay supported Codex access to your other signed-in Lerix clients.

Codex auth in the Mac app

Codex auth is a separate access path from an OpenAI API key. Lerix reads the local Codex session created by the Codex CLI and uses it only on the Mac where that session exists.

After Codex session auth is connected, it appears under ChatGPT in the model menu. If you also have ChatGPT API keys, use Access to choose between the API key and Codex auth before selecting a model.

Sign in to Codex on the Mac

  1. Install the Codex CLI if it is not already installed. OpenAI documents Codex CLI installation in its getting-started guide.
  2. Open Terminal on the same Mac where you use the Lerix Mac app.
  3. Run codex login.
  4. Complete the ChatGPT sign-in flow in the browser. Use ChatGPT sign-in for Codex session auth; do not use codex login --with-api-key for this Lerix feature.
  5. Run codex login status to confirm the CLI is signed in.

Lerix looks for the Codex session at ~/.codex/auth.json. API-key based Codex configuration is not usable for Codex session auth or Codex Relay. If Lerix shows that status, run codex login again and sign in with ChatGPT.

Connect Codex auth in Lerix

  1. Open the Lerix Mac app.
  2. Sign in to Lerix if you want encrypted sync or Codex Relay. Local Codex auth can be used on that Mac without relay, but relay requires a signed-in Pro account.
  3. Open Settings > Connections.
  4. Find Codex session auth. If it is missing or shows an unavailable reason, run codex login again and reopen Lerix.
  5. Choose Edit models.
  6. Enable the supported ChatGPT/OpenAI models you want to show in the composer.
  7. Return to chat, open the model menu, choose ChatGPT, then choose Codex auth from Access.

Codex Relay on Pro

Codex Relay lets another Lerix client use the Mac app's Codex session when both clients are signed in to the same Lerix account. The Mac stays the host and must remain open and signed in while another client sends through the relayed model.

  1. Use a Pro account.
  2. Sign in to the same Lerix account on the Mac app and the other Lerix client.
  3. On the Mac app, open Settings > Connections.
  4. Connect at least one model under Codex session auth.
  5. Turn on Codex Relay.
  6. On the other Lerix client, open the model menu, choose ChatGPT, then choose the relayed Codex access path from Access.

Free accounts can sync API keys, but chat history, attachments, and Codex Relay require Pro.

Requirements

  • Install and open the Lerix Mac app on the desktop that has Codex auth available.
  • Sign in to Codex with ChatGPT from the Codex CLI on that Mac.
  • Sign in to the same Lerix account on the desktop and the client that will use relay.
  • Use a Pro account for Codex Relay.
  • Enable Codex Relay in Settings > Connections on the desktop host.
  • Keep the desktop app open and signed in while another client sends through the relayed model.

How this differs from an API key

Access pathUsed forWhere it runs
OpenAI API keyChat through your OpenAI API account.The client sends AI service requests through the direct API-key path where supported.
Codex authSupported Codex-authenticated ChatGPT/OpenAI model workflows in the Mac app.The Mac app uses its local Codex session.
Codex RelayUsing that desktop Codex access from another signed-in Lerix client on the same Pro account.The desktop acts as the live relay host for the request.

Privacy and storage

Codex Relay is separate from API-key usage. Standard API-key chats use the selected AI service access path. Codex Relay is only for same-account clients using the Mac app's Codex session.

For storage behavior, see end-to-end encrypted sync and account plan comparison.