> ## Documentation Index
> Fetch the complete documentation index at: /docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Codex

> Install the Codex CLI, sign in, choose its setup in CoClip and fix version and install messages.

Codex is OpenAI's command-line agent. In CoClip it runs in a **Codex** tab of the [AI dock](/docs/ai-agents/ai-dock.md), with the CoClip tools, skills and agent roles added for that session.

## Install and sign in

CoClip needs the Codex CLI **0.144.5** or newer. CoClip never installs or updates Codex. The install command comes from OpenAI; check the [official Codex repository](https://github.com/openai/codex) for the current steps.

**1. Install Codex**

Open PowerShell (Terminal on macOS) and run:

```bash theme={null}
npm install -g @openai/codex
```

This needs Node.js. OpenAI also offers a standalone installer.

**2. Sign in once**

Run `codex` and follow the sign-in steps. Your sign-in stays on your computer.

**3. Check the version**

Run `codex --version`. It must show 0.144.5 or newer.

**4. Open a Codex tab**

In CoClip, click **+** in the AI dock and pick **Codex**.

## Choose the setup

Open **Settings** → **AI assistants** → **Codex**:

| Option | What Codex loads |
| - | - |
| **CoClip setup only (recommended)** | Only the CoClip tools, skills and subagents for that session. Keeps your sign-in. Your own Codex configuration is never changed. |
| **Use my own Codex setup** | Also your own configuration, with the CoClip tools added for that session only. |

The choice applies to the next Codex session the AI dock starts. In both modes CoClip adds its tools per session and never writes to your Codex configuration or your project folder.

## What Codex gets in CoClip

* The CoClip tools, the CoClip skills and the five agent roles. See [Skills and agent roles](/docs/ai-agents/skills-and-agents.md).
* CoClip tools run without asking, for that session only. Other actions, such as shell commands, follow the agent's own approval prompts.
* Codex has no direct link to the timeline selection. When you say "fix this clip", it reads your current selection with a CoClip tool.

## Messages and fixes

| What you see | Fix |
| - | - |
| **Codex CLI is not installed on this PC** (or Mac) | Run `npm install -g @openai/codex`, run `codex` once to sign in, then click **Open Codex again**. |
| **Codex … is too old for CoClip** | Update Codex with `npm install -g @openai/codex` (or `codex update` for the standalone install), then click **Open Codex again**. |
| **CoClip could not read the Codex version** | Run `codex --version` in a terminal. If it fails, reinstall Codex. |
| **CoClip starts Codex's own codex.exe, but only the npm launcher was found** (Windows) | Reinstall Codex with `npm install -g @openai/codex`, then open the tab again. |
| Codex shows its own error about the model | Your Codex is too old for that model. Update Codex. CoClip never chooses a model for Codex. |
| Codex is still not found after installing | Restart CoClip. |
| **Codex 1 exited** | Click **Restart** for a new session, or **Close** to drop the tab. |

## Related pages

* [Use Codex outside the editor](/docs/ai-agents/outside-the-editor.md#codex)
* [AI log and undo](/docs/ai-agents/ai-log-and-undo.md)
* [Troubleshooting](/docs/reference/troubleshooting.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.