config-codex-cli

Configures the OpenAI Codex CLI to use OmniRoute as an OpenAI-compatible backend.

59.5k|8.3k|Updated Feb 13, 2026
One-click install
npx skills add https://github.com/diegosouzapw/OmniRoute --skill config-codex-cli
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: config-codex-cli
Source: https://github.com/diegosouzapw/OmniRoute/tree/main/skills/config-codex-cli
Command: npx skills add https://github.com/diegosouzapw/OmniRoute --skill config-codex-cli

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Setting up the OpenAI Codex CLI to route through OmniRoute requires OS-specific configuration, correct profile definitions, and environment variables that are easy to get wrong, especially for long-running sessions.

Core Features & Use Cases

  • Cross-platform setup: Detects the operating system (Linux, macOS, Windows) and shell, then writes config.toml with 7 named profiles.
  • Environment configuration: Sets the required environment variables and verifies the installation works end to end.
  • Long-running task tuning: Documents session affinity TTL and stream idle timeout settings so multi-hour Codex sessions are not silently broken by default limits.
  • Use Case: A developer wants Codex CLI to run overnight refactoring jobs through OmniRoute's free-tier providers without dropped connections or lost prompt-cache continuity.

Quick Start

Configure my Codex CLI on this machine to use OmniRoute as its OpenAI-compatible backend and verify the setup works.

Frequently Asked Questions about config-codex-cli

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I configure Codex CLI to use OmniRoute?

Run the guided workflow which detects your OS and shell, writes config.toml with 7 named profiles, sets the required environment variables, and verifies the setup. OmniRoute must be installed first via npm install -g omniroute.

How to run long Codex CLI sessions through OmniRoute without disconnects?

Set the session affinity TTL to 43200 seconds (12h) or higher in Dashboard Settings under Routing, and set STREAM_IDLE_TIMEOUT_MS=0 and FETCH_BODY_TIMEOUT_MS=0 in the OmniRoute environment. Defaults otherwise break multi-hour sessions.

Does Codex CLI configuration work on Windows and macOS?

Yes, the workflow supports Linux, macOS, and Windows. It detects the operating system and shell automatically and writes the appropriate config.toml and environment variable settings for each platform.

Why does my Codex session lose prompt-cache continuity between turns?

Session affinity is disabled by default (sessionAffinityTtlMs is 0), so each turn can land on a different account. Set the affinity TTL above your expected task length so Codex session keys pin requests to one account.

Why does my Codex stream get force-closed during quiet reasoning turns?

The default stream idle timeout is 10 minutes, and synthetic SSE heartbeats do not reset the idle clock. A quiet turn past that window is closed with a stream idle timeout error, so set STREAM_IDLE_TIMEOUT_MS=0 for long tasks.