Complete install and setup guide

How to use GPT-5.6 Sol in Codex CLI

Want to run OpenAI Codex with GPT-5.6 Sol from your terminal? If your organization has Codex preview access, the model switch is one command: codex -m gpt-5.6-sol. This walkthrough starts from zero, including installing Codex, signing in, opening a project, confirming the active model, and fixing the errors first-time users are most likely to see.

The command

codex -m gpt-5.6-sol

Run it inside the folder you want Codex to work on. Codex opens its interactive terminal interface and requests GPT-5.6 Sol for that session.

Access matters: GPT-5.6 is currently a limited preview for select trusted partners and organizations. Installing Codex does not add the model to an unapproved account. Use the account and Codex workspace included in your organization's approval; there is no public self-service signup or waitlist for the preview.

What the command means

codex
Starts the OpenAI Codex command-line app.
-m
Short for --model. It overrides your configured model for this run.
gpt-5.6-sol
The exact model identifier, or slug, for GPT-5.6 Sol.

This does not download a model onto your computer. It tells Codex which OpenAI-hosted model to use after your account and workspace access are checked.

Before you begin

On Windows, open PowerShell or Windows Terminal. On macOS, open Terminal. On Linux, open your usual terminal application. A terminal is simply the text window where you type the commands shown below.

Step 1: check whether Codex is already installed

Type this and press Enter:

codex --version

If you see a version such as codex-cli 0.144.0, Codex is installed. Skip to sign-in. If the terminal says that codex is not recognized or not found, install it next.

Step 2: install Codex CLI

Windows, macOS, or Linux with npm

Install the current LTS version of Node.js first; its installer includes npm. Close and reopen your terminal, then confirm both commands work:

node --version
npm --version

Now install the official Codex package globally:

npm install -g @openai/codex@latest

macOS or Linux standalone installer

OpenAI also documents this installer, which does not require you to set up npm first:

curl -fsSL https://chatgpt.com/codex/install.sh | sh

Only run install commands copied from the official Codex CLI documentation. Reopen the terminal if the new codex command is not visible immediately.

After either installation path, verify it:

codex --version

Step 3: sign in to Codex

Run:

codex login

Choose Sign in with ChatGPT and finish the browser flow. Codex also supports API-key authentication for usage-based access, but a key is not required when you use ChatGPT sign-in. Most importantly, sign in with the account and select the workspace that OpenAI approved for the GPT-5.6 preview. API approval and Codex approval are separate, so access in one product does not automatically grant access in the other.

Step 4: open the project folder

Codex works against the folder where you start it. Move into an existing project with cd. For example:

Windows PowerShell

cd C:/Projects/my-app

macOS or Linux

cd ~/Projects/my-app

Starting from scratch? Make an empty folder and enter it:

mkdir my-codex-project cd my-codex-project

For an existing codebase, create a Git checkpoint before asking an agent to edit files. That gives you a clean way to inspect or undo changes.

Step 5: launch Codex on GPT-5.6 Sol

From inside the project folder, run the exact command:

codex -m gpt-5.6-sol

When the Codex interface opens, type /status. The status view should name gpt-5.6-sol as the active model. You can also type /model to see the models available to your current account and switch models interactively.

Then describe one concrete task. Useful first prompts include:

If GPT-5.6 Sol is unavailable

An error such as "model not found," "not supported," or "you do not have access" usually means the command is valid but the signed-in account cannot use that preview model. Work through these checks in order:

  1. Update Codex. If you installed with npm, run npm install -g @openai/codex@latest. If you used the standalone installer, run the official installer again.
  2. Check your sign-in. Run codex logout, then codex login and use the approved account and workspace.
  3. Inspect the model picker. Start Codex normally with codex, type /model, and look for GPT-5.6 Sol. If it is absent, the workspace catalog is not exposing it to you.
  4. Confirm the product approval. Ask your workspace administrator or OpenAI account representative whether your approval includes Codex, not only the API.

There is no alternate spelling or local install that bypasses preview access. Use another model shown by /model until access is enabled.

Fix "codex is not recognized" or "command not found"

First close every terminal window and open a new one so it reloads your PATH. Then run npm install -g @openai/codex@latest again and check codex --version. On Windows, where.exe codex shows whether the executable is on your PATH. On macOS or Linux, use command -v codex.

If npm reports a permission error on macOS or Linux, do not blindly add sudo. Use OpenAI's standalone installer or configure a user-owned Node/npm installation, then retry. If the install succeeds but an old Codex version still runs, check the path command above for duplicate installations.

Keep Codex current

The model catalog and authentication flow can change during a preview. Update an npm installation with:

npm install -g @openai/codex@latest

Then confirm the installed version with codex --version. For a standalone macOS/Linux installation, rerun the official installer command.

Frequently asked questions

Will codex -m gpt-5.6-sol work for everyone?

No. It works when GPT-5.6 Sol is available to the signed-in Codex account and workspace. GPT-5.6 is a limited preview, not a public model rollout.

Do I need an OpenAI API key?

Not if you sign in with ChatGPT. Codex supports ChatGPT subscription access and API-key usage, but preview access still has to be enabled for the product and organization you use.

Does -m permanently change my default model?

No. The flag overrides the configured model for that run. Inside Codex, /model changes the active model and /status confirms what the session is using.

Is GPT-5.6 Sol running locally?

No. Codex runs on your computer and can work with local files and commands, but GPT-5.6 Sol is an OpenAI-hosted model. The command selects the remote model; it does not download model weights.

Official sources

This guide was checked against OpenAI's Codex CLI, command reference, authentication, and GPT-5.6 preview documentation.

Advertisement