Skip to content

Connect Codex

Codex supports two native sign-in modes: OpenAI API (api) and ChatGPT (chatgpt). Sign in through Codex first. CMX leaves its native credentials with Codex.

Terminal window
codex login
cmx setup --ask-connect-ready
cmx providers codex list

If you declined the setup prompt, choose the mode that matches your Codex sign-in:

Terminal window
cmx providers codex connect api
# or, for a ChatGPT sign-in:
cmx providers codex connect chatgpt

Use one mode at a time. CMX updates Codex’s config.toml (normally ~/.codex/config.toml; CODEX_HOME is supported) and starts the gateway if needed. Restart Codex, send a request, and check cmx stats. cmx harness verify checks whether Codex points at a running gateway.

Terminal window
cmx providers codex disconnect api
# Substitute chatgpt if that was the connected mode.

You can also run cmx harness disable codex. Restart Codex afterward. cmx stop restores direct settings while stopping the gateway; a later cmx start can reconnect previously selected routes. An explicit disconnect or disable is the way to stay direct.

If cmx providers codex list says credentials are missing, complete Codex’s native sign-in. For API-key mode, use Codex’s supported key input or an environment variable; never paste keys into CMX config or support messages. See Troubleshooting.