Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.ctrlnode.ai/llms.txt

Use this file to discover all available pages before exploring further.

Provider id: codex · CtrlNode agent type: CodexSdk Uses @openai/codex-sdk (stdio JSON-RPC to codex app-server). Each agent gets an isolated CODEX_HOME under the workspace.

When to use it

  • You use OpenAI Codex for autonomous coding on the Bridge host
  • You want per-agent Codex configuration directories

Prerequisites

Install Codex CLI with optional native deps:
npm install -g @openai/codex
codex --version
which codex   # note path for CODEX_BIN_PATH

Authentication

Option A — API key
CODEX_API_KEY=sk-...
Option B — CLI login
codex auth login

Environment variables

VariableDefaultDescription
CODEX_API_KEYOpenAI API key
CODEX_BIN_PATHAuto from PATHAbsolute path to codex binary
CODEX_DEFAULT_MODELSDK defaulte.g. gpt-5.4-nano
CODEX_TIMEOUT_MINUTES10Task timeout
AGENTS_FOLDERHomeWorkspace root

Example .env

PAIRING_TOKEN=...
PROVIDERS=codex
CODEX_API_KEY=sk-...
CODEX_BIN_PATH=/usr/local/bin/codex

CtrlNode setup

  1. Project agent type Codex
  2. Register agents in Team
  3. Ensure agent type is CodexSdk so routing uses codex, not Copilot or Cursor

Troubleshooting

IssueFix
Unable to locate Codex CLI binariesReinstall with optional deps; set CODEX_BIN_PATH
Wrong provider executed taskAgent must be CodexSdk; check sync_codex_agents after reconnect
401codex auth login or refresh CODEX_API_KEY
← All providers