Codex + Cuiar

Codex checks the admin panel at 2 a.m.

  • ~/.codex/config.toml
  • OAuth, or a key from a variable
  • Works with codex exec

Codex already runs your tests at night. Some checks live in a web admin panel or a vendor dashboard, behind a login.

Add Cuiar to config.toml, and codex exec can open those pages in your Admin workspace, read the failures and file the issues. The Codex CLI, the IDE extension and the ChatGPT desktop app read the same file.

A clock turns to 2:00 and a cron line starts codex exec. Codex reads the failed-jobs table in a Cuiar tab row by row, and three GitHub issues appear, one for each new failure.

Setup

Two lines of TOML and one sign-in.

Codex runs on your computer, next to the Cuiar app.

  1. 1

    Add the server

    Or run codex mcp add cuiar --url https://mcp.cuiar.com/mcp.

    ~/.codex/config.toml
    [mcp_servers.cuiar]
    url = "https://mcp.cuiar.com/mcp"
  2. 2

    Sign in

    codex mcp login cuiar
  3. 3

    Give long tasks time

    A run_task call can take minutes. The default tool timeout is 60 seconds.

    ~/.codex/config.toml
    [mcp_servers.cuiar]
    url = "https://mcp.cuiar.com/mcp"
    tool_timeout_sec = 600
  4. 4

    Run it

    codex exec "With the Cuiar tools, open the failed-jobs page in my Admin workspace and list the new failures"

Other ways to connect

  • A key for cron

    Cron cannot open a browser for OAuth. Put a key with the mcp scope in a variable, and Codex sends it as a Bearer token.

    ~/.codex/config.toml
    [mcp_servers.cuiar]
    url = "https://mcp.cuiar.com/mcp"
    bearer_token_env_var = "CUIAR_MCP_KEY"
  • Local stdio

    Or run codex mcp add cuiar -- cuiar mcp.

    ~/.codex/config.toml
    [mcp_servers.cuiar]
    command = "cuiar"
    args = ["mcp"]
  • The CLI from Codex's shell

    Codex can also run cuiar commands. If the sandbox blocks their network calls, allow the network for the workspace-write sandbox, or use MCP.

    ~/.codex/config.toml
    [sandbox_workspace_write]
    network_access = true

Route

MCP needs no hole in the sandbox.

The MCP route needs no network rule in Codex's sandbox. The same config.toml serves the CLI, the IDE extension and the ChatGPT desktop app.

Remote MCPmcp.cuiar.com/mcp
Best fit
OAuth with codex mcp login, or bearer_token_env_var for cron.
Local MCPcuiar mcp
Works
command = "cuiar" with args = ["mcp"].
CLIcuiar exec
Works
cuiar exec --json in the shell. The sandbox can block its network calls.
Routineson a schedule
Works
Codex Scheduled tasks in the ChatGPT app, a cron line with codex exec, or a Cuiar routine without Codex.

Example tasks

Jobs for codex exec

  • 01

    Check a PR preview

    codex exec "Read the preview URL from the PR description, open it with the Cuiar tools, sign up with a test email and list any broken page or console error."
  • 02

    Sum up an incident

    “Check the status pages of our four providers and the error dashboard in my Ops workspace. Write a short incident summary to ops/status.md.”

    Codex runs cuiar run --workspace ops.

  • 03

    Export data for a migration

    cuiar run --workspace admin --folder ./migration/data "Export all customers as CSV from the admin panel"

    Codex then writes the import script for that file.

  • 04

    Read vendor changelogs

    cuiar --odyssey --permission read-only "Collect the release notes since our pinned versions for these six SDKs and list the breaking changes"

    Odyssey is on Pro and Team. cuiar tasks cloud <id> keeps it going while the laptop sleeps.

  • 05

    File nightly failures

    0 2 * * * codex exec "With the Cuiar tools, open the failed-jobs page in my Admin workspace and file one GitHub issue per new failure"

    A crontab line. It needs the key route.

Good to know

ChatGPT on the web
It does not read config.toml. Add Cuiar there as a plugin; the ChatGPT page has the steps.
Sandbox
codex exec runs read-only by default. Add --sandbox workspace-write when the job writes files.

Templates to run from Codex

All templates

Each template page shows the run_task or create_routine call to give Codex.