Skip to main content
Manage the connections Codex runs on. Add a ChatGPT plan with a device-login flow, or an OpenAI API key. Each connection has a name, and you can hold several at once, for example two ChatGPT plans and an API key. Adding one never replaces another. See Agent connections. The first task-usable connection added becomes your default for Codex tasks when none was chosen. A second add never moves it. See default connection rules.

Usage

Subcommands

aether codex connect

Start the device-authorization flow. The command prints a verification URL and a user code, opens the URL in your browser, and polls until you authorize (up to 10 minutes). It then stores the plan as a new connection under --name. Without --name, the connection is named ChatGPT plan.
Names are unique per option. If you already have a ChatGPT plan connection with that name, the command fails with connection_name_taken, so pass a different --name. If the ChatGPT account you signed in with is already one of your connections, the command fails with connection_account_held and names that connection.

aether codex reconnect

Sign in with device login again to refresh an existing ChatGPT plan connection, keeping its name and id. Agents and tasks pointing at it keep working; no second row is created.
--name is required. This addresses the ChatGPT plan when another option shares the name. An unknown name fails and lists the connections you hold. The API’s option-mismatch sentence is shown unchanged.

aether codex api-key

Add an OpenAI API key as a new connection. Omit --api-key to enter the key at a secure prompt.
To rotate a held key instead of adding another connection:
Omit --api-key to use the secure prompt. An unknown name lists your held connections; an option mismatch preserves the API’s error sentence.

aether codex status

List every Codex connection in the order you added it: its name, its option, the ChatGPT account’s email or the API key’s last four characters, and whether it needs re-authentication.
When you hold no connection, the command prints Codex: not configured and points you to connect or api-key.

aether codex logout

Remove the connection named by --name. Every other connection stays in place. If you hold exactly one connection, you can leave out --name. The command refuses, and lists your connections, in two cases:
  • You hold several connections and gave no --name.
  • The name matches more than one connection, for example a ChatGPT plan and an API key that share a name. Remove that one under Connections on the web.
Disconnecting the default while another task-usable Codex connection is held is refused: use Make default for Codex tasks in Settings → Connections first. Removing the last one sets the default to Aether inference. Tasks that ran on the removed connection follow the harness’s default for their next turn; past turns keep their ran-on records. A personal agent or profile running on the row also blocks removal until you move it.

See also