Undercut for Codex CLI
Undercut is a free, MIT-licensed policy file Codex CLI can load as a skill — cheap tier first, escalate only on evidence, never on a vibe. Codex CLI runs a single configured model and model_reasoning_effort for a whole session by default — there's no built-in per-task tiering, which is exactly the gap a dispatch-time skill fills.
How this maps onto Codex CLI
Codex CLI's model selection is documented in its configuration reference as two separate config.toml keys: model (which model — a full swap) and model_reasoning_effort (minimal | low | medium | high | xhigh, a reasoning-depth dial on the Responses API within whichever model is selected). Both can be set globally in ~/.codex/config.toml, overridden per-project in a trusted repo's .codex/config.toml, or swapped per invocation with a named --profile. That's a different shape from a single-vendor model family with one "smallest → largest" ladder — it's two independent dials.
Undercut's tier names — cheap, standard, frontier, apex — are generic on purpose. models.md already carries an OpenAI column for the eval harness, but those are OpenRouter-catalog slugs, not necessarily Codex CLI's own bundled model names — the file says explicitly to map each tier to "that agent's closest current model at that tier's capability level" rather than hardcoding a slug. For Codex specifically, that mapping is honestly two-dimensional: a cheap unit of work should get both the smaller model and a low model_reasoning_effort; an escalated unit gets either lever turned up, whichever the person configuring Codex has available. We have not independently verified which exact Codex model IDs (e.g. current gpt-5.x-codex variants) exist at each capability tier as of this writing — treat the models.md OpenAI row as a starting point, not a Codex-verified mapping, and confirm current slugs with codex --version/your Codex model picker before wiring a profile to it.
Nothing about this sits between Codex CLI and the OpenAI API. It's a policy file Codex reads at dispatch time, same as any other skill — no proxy, no network hop, nothing to route around if you remove it.
Install for Codex CLI
vercel-labs/skills auto-detects Codex CLI on your machine (pass -a codex to target it explicitly) and drops the skill into Codex's own skills path.
Clone or download undercutsh/firstpass, then copy skills/firstpass/ into one of the paths Codex CLI's own docs list as scanned for skills (per Codex's skills documentation): repo-scoped at .agents/skills/ (from your working directory up to the repo root), or user-level at $HOME/.agents/skills/ — note this is a different directory convention from Claude Code's .claude/skills/.
testing/README.md and the raw JSON in testing/results/node src/main.js --mockZero lock-in. It's a policy Codex CLI follows — remove the skill and you're back to status quo.
How it works
The Undercut Rubric · v1This is a named, versioned spec — not internal logic we could quietly change. When the rubric changes (a new flag, a different cap), the version number moves and the changelog says why.
Every unit of work gets scored against six flags, then assigned the cheapest tier that can plausibly handle it. It only moves up a tier when something objective proves it needs to — a failed check, a measured disagreement, an explicit uncertainty flag. It never moves up on a guess, and it never moves back down mid-task.
0 flags → cheap · 1–2 → standard · 3+ or any ownership/judgment call → frontier. Apex only when you can write one sentence stating why the marginal intelligence pays for the cost.
Cheap-to-verify ⇒ cheap-to-generate. If output can be checked mechanically, it starts at the lowest tier regardless of how hard it looks — verification catches failure. Only unverifiable work needs to start high.
The next tier up gets only the failed or uncertain items, plus verification notes. It resolves the residue — it never redoes the batch.
Never de-escalate mid-task. Max one retry per tier. Anything still unresolved goes to a single batched apex tie-break call. One hard file in a 700-file job doesn't drag the other 699 up a tier.
unit of work
|
6-flag rubric
|
+---+----+
| 0 flags|--> cheap
| 1-2 |--> standard
| 3+/own |--> frontier
+---+----+
| fail x2 / disagree / uncertain
v
escalate +1 tier
(residue only)
|
still unresolved?
v
single batched
apex tie-break
Why it holds up
Even when the rubric flags are scored imperfectly, the escalator still routes work to the right tier almost every time — because a wrong flag only ever costs one extra cheap attempt, never a wrong answer or a big bill.
A stock dispatcher model reproduces the rubric flags imperfectly — Haiku hits 90% agreement, Sonnet 93%. The weakest flag (format-strict) is only 60%. None of that matters: under the shipped policy, both dispatchers still route 100% of units to the correct tier. A wrong flag changes the ladder cap, never the base tier — worst case, one extra cheap attempt.
Every rule is a property of the unit of work — verifiable, ambiguous, blast-radius — never a specific model's known weakness. Vendor cards go stale as models change; work properties don't. It's also hard-won — a format-strict rule that worked on Anthropic backfired on Gemini, which is exactly why the rubric no longer encodes per-vendor behavior.
Honest limits
Not a proxy, not a gateway, doesn't auto-flag in production (Codex CLI scores the flags itself — measured robust to getting them wrong, see above), and doesn't promise a dollar figure for your workload. Full list, with the finance/procurement note and the paid-tier disclosure, is on the main page.
Nothing about this page expires. What does keep happening is the token bill, one session at a time, on whatever Codex CLI is currently doing with mechanical work.