# Codex (OpenAI)

OpenAI open-source AI coding assistant that understands code, modifies projects, and runs tests in the terminal.

> This is the Markdown version of the Codex (OpenAI) page on OpenNavo, with the same facts as the web page: <https://opennavo.com/apps/codex>

- **Latest version**: `0.171.0`
- **Developer**: OpenAI
- **Homepage**: <https://github.com/openai/codex>
- **Categories**: [Developer Tools](https://opennavo.com/categories/developer-tools)
- **Install**: `brew install --cask codex`
- **30-day installs**: 570,636
- **Homebrew**: Available; updated by Homebrew
- **Download URL**: <https://github.com/openai/codex/releases/download/rust-v0.171.0/codex-package-aarch64-apple-darwin.tar.gz>
- **SHA-256**: `58c88032ec446e72922d911d8f03773102da20c16a6059cf21f6744bce57f210`
- **Commands**: codex

SHA-256 only checks that the download is complete; it is not a security certification.

## Installation and removal contents

```json
[
  {
    "declaration": {
      "binary": [
        "bin/codex"
      ],
      "target": "$HOMEBREW_PREFIX/bin/codex"
    },
    "phase": "install",
    "sources": [
      "bin/codex"
    ],
    "target": "$HOMEBREW_PREFIX/bin/codex",
    "type": "binary"
  },
  {
    "declaration": {
      "generate_completions_from_executable": [
        "bin/codex",
        "completion",
        {
          "base_name": null,
          "shell_parameter_format": null,
          "shells": [
            "bash",
            "zsh",
            "fish"
          ]
        }
      ]
    },
    "phase": "install",
    "sources": [
      "bin/codex",
      "completion"
    ],
    "type": "generate_completions_from_executable"
  },
  {
    "declaration": {
      "zap": [
        {
          "rmdir": "~/.codex"
        }
      ]
    },
    "phase": "cleanup",
    "sources": [],
    "type": "zap"
  }
]
```

## About

Codex for Mac is OpenAI’s coding assistant for a local repository. You install the CLI or use the desktop app, sign in with ChatGPT or an API key, and ask it to inspect code, edit files, and run tools already on the machine. Plan limits follow the ChatGPT plan or API rates. A sandbox and an approval policy decide what it may touch. This page covers install and sign-in, plans and usage, CLI versus desktop, permissions, three task examples, and common errors.

### Install and sign in

On macOS, OpenAI documents three installs: `brew install --cask codex`, the script `curl -fsSL https://chatgpt.com/codex/install.sh | sh`, and `npm install -g @openai/codex`. The same commands update an existing install (`brew upgrade --cask codex`, or rerun the script or npm command). Open a project directory and run `codex`. On launch, sign in with ChatGPT or another method on the authentication page. ChatGPT sign-in uses your subscription and workspace rules. An API key bills usage at API rates and follows the API organization’s data settings. Codex cloud requires ChatGPT sign-in. Create Git checkpoints before and after a task so you can revert. Related assistants are in the [AI category](/categories/ai).

### Plans and usage

OpenAI’s Codex pricing page lists individual plans as Free at $0 per month, Go at $8 per month, Plus at $20 per month, and Pro from $100 per month, with a higher Pro tier also shown. Business is listed at $20 per user per month, and Enterprise is custom. Included speed, models, and surfaces differ by plan: Plus lists Codex on the web, in the CLI, in the IDE extension, and on iOS. ChatGPT Work and Codex share usage. Extra work can use ChatGPT credits. API-key sessions are charged from API token prices, which are separate from subscription allowances. Confirm the live table before you rely on a quota.

### CLI and the desktop app

The CLI keeps the coding loop in a terminal: explain a repository, plan a change, edit files, and run local tools. `codex exec` runs the same agent from a script or CI job. A review command reports findings on uncommitted changes, a commit, or a base branch without modifying the working tree. The ChatGPT desktop app, the CLI, and the IDE extension can all sign in with ChatGPT or an API key for local work. The desktop app is the graphical surface; the CLI is the one this Homebrew cask installs. Skills and plugins package repeatable instructions. Other Mac developer utilities are in the [Developer Workbench collection](/collections/developer-workbench).

### Permissions and the sandbox

By default the agent runs with network access off. Locally, an OS sandbox limits what it can touch, typically to the current workspace, and an approval policy decides when it must ask before it acts. `codex --sandbox read-only --ask-for-approval on-request` is the documented read-only setup. `workspace-write` can edit the workspace; `danger-full-access` is the broader mode and should stay exceptional. The old `approval_policy = "untrusted"` setting is retired and can stop the client from starting; OpenAI’s current read-only replacement is `sandbox_mode = "read-only"` with `approval_policy = "on-request"`. Review every diff. Command-line tools for the same work sit in the [Developer Tools category](/categories/developer-tools).

### Three task examples

These prompts are the shapes OpenAI’s getting-started page describes, not measured benchmarks.

1. Explain the project: from the repository root, run `codex` and ask “Tell me about this project.” The agent reads the tree and answers in the terminal.
2. Make a focused change: ask for one edit, such as renaming a function and updating its call sites, then inspect the diff before you commit.
3. Debug a failure: paste the command and the error, and ask Codex to find the cause. With `codex --image` you can attach a screenshot of the error.

### Requirements and common errors

OpenAI’s CLI page documents macOS and Linux via the installer, Homebrew, and npm, plus a separate Windows installer. It does not publish a numeric macOS minimum, RAM figure, or disk figure, so this page does not invent one. The Homebrew cask records Apple silicon and Intel for version 0.166.0. Model calls need a network connection; the sandbox default still starts with the agent’s own network off until you enable it.

If the client will not start, remove a retired `approval_policy = "untrusted"` entry from user config, project config, and startup scripts. If a thread loses approvals after resume, current release notes say acknowledged approval settings are preserved. `codex doctor --network-only` checks configuration, connectivity, and WebSocket diagnostics. Sign-in errors follow the account: a ChatGPT plan that does not include the CLI surface, or an API key without the model you selected.

### Versions

The recorded version is 0.166.0, published on GitHub on 29 October 2026 as rust-v0.166.0. That release notes keyboard transcript selection, Markdown in questions and replies, GPT-6.1 Terra in the bundled and cloud model catalogs, `codex queue --resume`, and `codex doctor --network-only`. Update Homebrew with `brew upgrade --cask codex`.

### Related tools

[Claude Code](/apps/claude-code) is Anthropic’s terminal coding assistant and uses an Anthropic account. [Copilot CLI](/apps/copilot-cli) is GitHub’s terminal client and uses a GitHub Copilot plan. Each product has its own sign-in, usage limits, and permission model. Codex on this page is the OpenAI CLI cask plus the desktop sign-in path above.

### FAQ

#### How do I install Codex on a Mac?

OpenAI documents `brew install --cask codex`, the chatgpt.com install script, and `npm install -g @openai/codex`. Then run `codex` in a project directory and sign in.

#### Which sign-in should I use?

Use ChatGPT sign-in for subscription access and workspace rules. Use an API key for usage-based API billing. Codex cloud requires ChatGPT sign-in.

#### Does the CLI edit files on its own?

It can edit the workspace and run commands when the sandbox mode and approval policy allow it. The default keeps network access off and limits the sandbox to the workspace. Review the diff and keep Git checkpoints.

#### What is the recorded version?

0.166.0, matching GitHub release rust-v0.166.0 dated 2026-10-29.

Last updated: 2026-11-06. Sources: OpenAI Codex CLI, authentication, agent approvals, and pricing docs (https://developers.openai.com/codex/cli) and GitHub release 0.166.0 (https://github.com/openai/codex/releases/tag/rust-v0.166.0).

### Official references

- [Codex CLI](https://developers.openai.com/codex/cli)
- [Authentication](https://developers.openai.com/codex/auth)
- [Agent approvals and security](https://developers.openai.com/codex/sandbox)
- [Pricing](https://developers.openai.com/codex/pricing)
- [GitHub release 0.166.0](https://github.com/openai/codex/releases/tag/rust-v0.166.0)

## System requirements

- Build for macOS 27, 26, 15, 14, 13, 12, 11 · Version: 0.171.0 · Intel · <https://github.com/homebrew/homebrew-cask/blob/HEAD/Casks/c/codex.rb> · Checked 2026-11-21
  - <https://github.com/openai/codex/releases/download/rust-v0.171.0/codex-package-x86_64-apple-darwin.tar.gz>
  - SHA-256: `dd130ea3217b4e6fe4454c99949e0b28e2e8a9ad8da8c3a75f0c7265fab7153b`
- Build for macOS 27, 26, 15, 14, 13, 12, 11 · Version: 0.171.0 · Apple silicon · <https://github.com/homebrew/homebrew-cask/blob/HEAD/Casks/c/codex.rb> · Checked 2026-11-21
  - <https://github.com/openai/codex/releases/download/rust-v0.171.0/codex-package-aarch64-apple-darwin.tar.gz>
  - SHA-256: `58c88032ec446e72922d911d8f03773102da20c16a6059cf21f6744bce57f210`

## Codex (OpenAI) security facts

Only facts that can be checked, each with its source and date. This is not a safety certification. To check the files you downloaded, scan them on your Mac with OpenNavo.

- <https://github.com/openai/codex> · Open source: Yes — <https://github.com/openai/codex> · Checked 2026-11-13

## Uninstall

- `brew uninstall --cask codex`

A regular uninstall removes the app and keeps its settings and caches.

### Deep clean (optional)

- `brew uninstall --zap --cask codex`

`--zap` also deletes the settings, caches and other files listed in the Homebrew definition. They can include data shared with other apps and cannot be restored, and it does not guarantee that nothing is left. Back up any data you need first. To keep settings and caches, leave out `--zap`.

A regular uninstall removes the app and keeps its settings and caches.

- Files and folders: `~/.codex` — <https://github.com/homebrew/homebrew-cask/blob/HEAD/Casks/c/codex.rb> · These entries come from the Homebrew definition, checked 2026-11-21. They say what it declares, not what is on your Mac.

## Latest release notes

### 0.171.0 (2026-11-20)

Codex 0.171.0 adds GPT-6.2 Sol and Astra, turns on the terminal workspace by default, and adds remote exec plus remote-control commands for OpenAI’s terminal coding agent.

**Added**

- Adds GPT-6.2 Sol and Astra, with Sol as the default.
- The terminal workspace is on by default, with previews.
- Undo and redo in the prompt can restore pastes.
- codex exec --remote starts a session on an app server.
- /remote shows device pairing codes from the terminal.

**Fixed**

- Drafts stay with their thread when you switch sessions.
- Permission profiles stay when the working directory changes.
- Late completion events no longer cancel a newer approval.

## Facts and sources

- <https://opennavo.com/apps/codex>
- <https://opennavo.com/apps/codex/versions>
- <https://github.com/homebrew/homebrew-cask/blob/HEAD/Casks/c/codex.rb> · Checked 2026-11-21
- <https://formulae.brew.sh/cask/codex>
- <https://github.com/openai/codex> · Checked 2026-11-13
