Skip to content

setup — OpenAI Codex CLI

Configure Codex CLI's native status line to show model, context, estimated thread cost when available, rate limits, and token usage. Use when the user asks to set up or change the Polytropos-style Codex status line.

In practice

What it does

Puts the facts you would otherwise keep asking for — model and reasoning level, an estimated thread cost, context used, rate-limit windows, tokens — into Codex's own status line. It uses the client's native status-line support; the Claude-only status-line script in this repository is never installed or invoked here.

When to reach for it

  • Use it once per machine, when you want the Polytropos-style status line in Codex CLI.
  • Use it to change which fields show or the order they appear in.
  • Not without your confirmation: this skill touches user-level configuration, so it shows the intended fields first and writes nothing until you agree.

Worked example

Inside Codex CLI, after confirming the field list the skill shows you:

/statusline

Select the fields in the order you want and save. The picker is preferred because it validates the identifiers your installed Codex version supports and leaves unrelated configuration alone. The intended result in ~/.codex/config.toml is:

[tui]
status_line = ["model-with-reasoning", "estimated-thread-cost", "context-used", "five-hour-limit", "weekly-limit", "used-tokens"]
status_line_use_colors = true

Start a new session if needed, then check the visible line.

Failure modes & fallbacks

  • The picker cannot be operated. A non-interactive edit is the fallback, only after you confirm the exact change. It merges or replaces just the two status-line keys, preserves every unrelated key and table, and writes valid TOML rather than a broad text replacement.
  • The client rejects an identifier. Only that identifier is removed, after the validation result is shown.
  • A field stays empty. It is reported as unavailable; rate-limit fields may be absent when the account or client does not expose them, and no value is invented.

Cost & safety

No model is dispatched. The one write is to your own Codex configuration, behind explicit confirmation, and the skill reports an existing status_line value without exposing unrelated configuration. estimated-thread-cost is an estimate the client exposes when it can — not proof of a bill.

  • update checks whether the installed Polytropos surfaces have drifted.
  • usage is the fuller, read-only look at past Codex activity.
  • doctor diagnoses the install when a native skill is absent or stale.

The skill card — what the model reads

This is the SKILL.md body the model reads, transformed for this page: the source's own leading title, if it had one, is removed; every remaining heading is demoted one level to nest under this section; and relative links are rewritten to site or GitHub URLs. ${CLAUDE_PLUGIN_ROOT} and {{POLYTROPOS_ROOT}} are install-time path variables, left intact exactly as the model sees them. The unmodified original is codex/skills/setup/SKILL.md.

Use Codex CLI's native status-line support. Do not install or invoke the Claude-only bin/statusline.py command.

Resolve POLYTROPOS_ROOT from this skill's location. In a managed copy use POLYTROPOS_ROOT="{{POLYTROPOS_ROOT}}"; reject the literal placeholder. The root is only for identifying the managed installation; status-line configuration belongs to Codex itself.

Preferred interactive setup

  1. Inspect the current [tui] section in ~/.codex/config.toml, if the file exists. Report the existing status_line value without exposing unrelated configuration.
  2. Show the intended ordered fields before changing anything:
[tui]
status_line = ["model-with-reasoning", "estimated-thread-cost", "context-used", "five-hour-limit", "weekly-limit", "used-tokens"]
status_line_use_colors = true
  1. Obtain explicit confirmation before writing user-level configuration or operating the interactive picker.
  2. In Codex CLI, run /statusline, select the same fields in the user's preferred order, and save. Prefer the picker because it validates the identifiers supported by that installed Codex version and preserves unrelated configuration.
  3. Start a new session when needed, then verify the visible status line. Report fields the installed client omits or cannot populate as unavailable; do not invent values.

Non-interactive fallback

Use this only when the picker cannot be operated and the user has confirmed the exact edit. Preserve every unrelated key and table in ~/.codex/config.toml. If [tui] or status_line already exists, merge or replace only the two status-line keys shown above. Parse and write valid TOML rather than using broad textual replacement.

If the installed Codex version rejects an identifier, remove only that unsupported identifier after showing the validation result. estimated-thread-cost is an estimate exposed by the client when available, not proof of a bill; rate-limit fields may be absent when the account or client does not expose them.

Finish by reporting the final ordered field list and whether it was verified in a fresh Codex session.