Skip to content
cccskills
FreePublished on GitHub

config-codex-cli

Configure Codex CLI to connect through OmniRoute on Linux, macOS, or Windows. The workflow detects the operating system and shell, creates configuration files and seven profiles, sets environment variables, and verifies the setup.

OriginalShow the original description

Step-by-step agent workflow to configure the OpenAI Codex CLI on any machine (Linux, macOS, Windows) to use OmniRoute as an OpenAI-compatible backend. Detects OS and shell, writes config.toml and 7 named profiles, sets environment variables, and verifies the setup.

Works withOpenAI
See how to install

Good for

  • Connect Codex CLI to OmniRoute
  • Set up Codex across different operating systems
  • Create seven named configuration profiles
  • Review settings for overnight Codex tasks

Files included (1)

  • SKILL.md2.7 KB

SKILL.md (original)

Review the instructions the agent will receive before you install.

<!-- generated by src/lib/agentSkills/generator.ts; manual edits will be overwritten -->

Overview

Step-by-step agent workflow to configure the OpenAI Codex CLI on any machine (Linux, macOS, Windows) to use OmniRoute as an OpenAI-compatible backend. Detects OS and shell, writes config.toml and 7 named profiles, sets environment variables, and verifies the setup.

Quick install

npm install -g omniroute   # or: npx omniroute
omniroute --version

Subcommands

No CLI subcommands mapped for this family yet.

<!-- skill:custom-start -->

Long-running Codex tasks (#7287)

Two OmniRoute defaults silently break multi-hour Codex sessions. Document them whenever configuring Codex for overnight / multi-hour work. Full guide: docs/guides/CODEX-CLI-CONFIGURATION.md → Long-running tasks.

Session affinity (default off)

  • Setting: sessionAffinityTtlMs (ms; UI shows Affinity TTL (seconds) under Dashboard → Settings → Routing → Session affinity). Legacy alias: codexSessionAffinityTtlMs.
  • Default 0 = disabled. Each turn can land on a different account and break prompt-cache / session continuity.
  • Codex session keys (x-codex-session-id, x-session-id, x-omniroute-session, body prompt_cache_key / session_id) are only used for pinning when TTL > 0.
  • Max: 86400 seconds / 86400000 ms (24h). Set TTL above the expected task length (e.g. 43200 s for ~12h).

Stream idle timeout (default 10 minutes)

  • Env: STREAM_IDLE_TIMEOUT_MS (default 600000). Also consider FETCH_BODY_TIMEOUT_MS (same baseline; 0 disables).
  • Synthetic SSE heartbeats do not reset the idle clock — only real upstream chunks do.
  • A quiet reasoning turn past the idle window is force-closed (stream_idle_timeout / StreamIdleTimeoutError). Grep logs for Idle timeout: no data from.

Recommended multi-hour recipe

  1. Dashboard → Settings → Routing → Session affinity → Affinity TTL = 43200 (12h) or 86400 (24h max).
  2. OmniRoute environment:
STREAM_IDLE_TIMEOUT_MS=0
FETCH_BODY_TIMEOUT_MS=0
  1. Restart OmniRoute. Leave Codex config.toml as usual (wire_api = "responses", correct base_url).

Defaults decision

Do not flip ship defaults in code for this skill: sessionAffinityTtlMs stays 0 and STREAM_IDLE_TIMEOUT_MS stays 600000. Long-running operators must opt in. See Discussion #5718 and issue #7287.

<!-- skill:custom-end -->

Reviews

No reviews yet. Tell others what you thought.

Comments

No login needed. Share how it worked for you, ask a question, or note where it did not run.

No comments yet. Be the first to write one.

Comments are published right away. Do not include personal information such as email addresses or phone numbers. Up to 2 URLs.

0 / 1,000 characters

This form is protected by reCAPTCHA, and the Google Privacy Policy and Terms of Service apply.

More skills from this repository

cli-a2a

FreeSummary

Use the command line to send tasks to OmniRoute's A2A server, which supports communication between agents. Inspect execution history and logs, monitor or cancel tasks, and interactively test the JSON-RPC 2.0 communication protocol.

  • Check server status and available skills
  • Invoke a skill with JSON input
  • Inspect task history and logs
diegosouzapw/OmniRoute78.2KUpdated Oct 18, 2026

cli-backup-sync

FreeSummary

Back up and restore OmniRoute data from the command line. Manage incremental snapshots, scheduled backups, encryption, and cloud synchronization, with options to compare differences and preview data transfers or imports before applying them.

  • Create a backup before restoring data
  • Schedule recurring backups
  • Compare differences before cloud synchronization
diegosouzapw/OmniRoute78.2KUpdated Oct 18, 2026

cli-batches

FreeSummary

Submit groups of AI requests as batch jobs with the OmniRoute command line. Manage input files, monitor or cancel jobs, save results and errors, and incorporate batch processing into automated build and deployment workflows.

  • Submitting AI requests from a JSONL file
  • Monitoring batch jobs and waiting for completion
  • Saving batch results and error details
diegosouzapw/OmniRoute78.2KUpdated Oct 18, 2026

cli-chat

FreeSummary

Send prompts to LLMs from a terminal, display answers as they arrive, or hold an ongoing conversation. Use files or standard input for prompts, choose models, and set system instructions through OmniRoute.

  • Sending a prompt from a terminal
  • Using file contents as a prompt
  • Displaying and saving streaming responses
diegosouzapw/OmniRoute78.2KUpdated Oct 18, 2026

cli-compression

FreeSummary

Configure prompt compression, which shortens text sent to AI models, through the OmniRoute command line. Adjust RTK filters, Caveman rules, and combined compression modes, then preview the results using real prompts.

  • Preview compression results with real prompts
  • Adjust RTK filters and Caveman rules
  • Compare combined compression modes
diegosouzapw/OmniRoute78.2KUpdated Oct 18, 2026

cli-contexts

FreeSummary

Manage OmniRoute context settings from the command line, including token budgets and RTK filters for processing context. Switch saved server connections, import or export configurations, and inspect or expire conversation sessions.

  • Adjust context token budgets and filtering rules
  • Switch between saved server connections
  • Import or export connection settings as JSON
diegosouzapw/OmniRoute78.2KUpdated Oct 18, 2026

See all skills by diegosouzapw

Report a problem with this skill