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

# Codex

> Using OpenAI's Codex CLI with CliDeck

[Codex](https://github.com/openai/codex) is OpenAI's CLI coding agent. CliDeck supports it with one-click telemetry setup.

## Setup

<Steps>
  <Step title="Launch a Codex session">
    Click **Codex** in the session launcher. The session starts normally.
  </Step>

  <Step title="Configure telemetry">
    On first launch, CliDeck shows a setup toast: **"Codex — Status Tracking"**. Click **Configure automatically**.

    CliDeck adds an `[otel]` section to `~/.codex/config.toml` with the correct endpoint settings.
  </Step>

  <Step title="Restart the session">
    After configuration, click **Restart Session** on the toast. The new session will have telemetry active.
  </Step>
</Steps>

This is a one-time setup. All future Codex sessions will have telemetry enabled automatically.

## What the Config Looks Like

CliDeck adds this to your `~/.codex/config.toml`:

```toml theme={null}
[otel]
exporter = { otlp-http = { endpoint = "http://localhost:4000/v1/logs", protocol = "json" } }
```

You can also add this manually if you prefer.

## Session Resume

Codex supports session resume. CliDeck captures the session ID from telemetry and uses `codex resume <sessionId>` to reconnect to previous sessions.

## Disabling Telemetry

If you want to stop sending telemetry from Codex to CliDeck:

1. Open **Settings** > **CLI Agents** > **Codex**
2. Toggle off **CliDeck integration**

CliDeck will remove the `[otel]` section from your Codex config file.

<Warning>
  If Codex releases a major update that changes its configuration format, you may need to update CliDeck. Check for the latest version with `npm update -g clideck`.
</Warning>
