31 tools· updated nov 2026

Codex statusline: tui.status_line, its 31 items, and no script hook

Marek.

  • codex
  • coding-agents
  • agent-ops

Want a different Codex status line? Edit tui.status_line under [tui] in ~/.codex/config.toml. Write item IDs from a fixed menu, in the order you want them on screen. The /statusline command writes the same list for you. Codex CLI 0.163.0 knows 31 items. There is no script hook like the one in Claude Code. You pick from a menu. You cannot print your own text.

[tui]
status_line = ["model-with-reasoning", "context-used", "five-hour-limit", "weekly-limit", "git-branch"]
  • One key. tui.status_line takes an array of strings. Leave it out and Codex shows three defaults. Set it to [] and the line is gone.
  • 31 items. Model, context, rate limits, tokens, git, thread state. All of them are built in.
  • Cost. estimated-thread-cost exists. The source marks it "Enterprise workspaces only".
  • No script. A command-based status line is still a feature request. Issue #17827 has been open since 14 April 2026.
  • How I know. I read the 0.163.0 source and the docs. I ran the config through the local CLI. I did not open the TUI for this post.

The Claude Code side, a script that reads session JSON on stdin, is in my statusLine post. This one covers Codex.

How do I configure the Codex status line?

Type /statusline in the Codex TUI. A picker opens with a preview. You toggle items. Left and right arrows change the order. The slash commands page says the footer "updates immediately and persists to tui.status_line in config.toml".

The other way is the file. The key sits under [tui]. Each string is one item. The order in the array is the order on screen. Codex puts a middle dot between items.

The picker also has "Use theme colors". That row writes tui.status_line_use_colors, default true. The config reference does not list it. The source does.

Same file as approval_policy, covered in Codex dangerously skip permissions.

What items can the Codex status line show?

The docs page names groups, not strings. The exact IDs come from status_line_setup.rs at tag rust-v0.163.0. The grouping below is mine.

GroupItem IDs
Modelmodel, model-with-reasoning, reasoning, fast-mode
Contextcontext-used, context-remaining, context-window-size
Limitsfive-hour-limit, weekly-limit
Tokens and costused-tokens, total-input-tokens, total-output-tokens, thread-credits, estimated-thread-cost
Placecurrent-dir, project-name, hostname
Gitgit-branch, pull-request-number, branch-changes
Threadthread-name, thread-title, thread-id, run-state, task-progress, raw-output, daybreak, workspace-headline
Safetypermissions, approval-mode
Othercodex-version

Some older names still parse. context-usage maps to context-used. session-id maps to thread-id. project and project-root map to project-name.

Several items hide when they have no data. Git items need a repo. Limit items wait for data from the API. An ID Codex does not know gets dropped. The rest still draw. Once per session the TUI prints Ignored invalid status line item: <id>. as a warning.

What does the default Codex status line show?

With the key unset, Codex shows model-with-reasoning, current-dir and thread-name. The thread name stays hidden until the thread has one.

Turning it off has a catch. The config reference types the key as array<string> | null. It says "null disables the status line." TOML has no null. I passed it as an override anyway. Codex read it as the string "null":

Error: failed to load bootstrap configuration

Caused by:
    invalid type: string "null", expected a sequence

The source draws the line in a different place. No key means defaults. An empty array means off. A comment in edit.rs says the empty array is written on purpose, so "hide the status line" stays distinct from "unset, so use defaults".

Can the Codex status line show cost and usage?

Usage, yes. Cost, only on some plans.

For usage there are six items. used-tokens prints a short total with "used". total-input-tokens and total-output-tokens print counts with "in" and "out". context-used prints "Context N% used". five-hour-limit and weekly-limit show what is left on the primary and secondary limits. This is the context window number most people want in the bar. How big that window is per model, and when Codex compacts it, is in Codex context window.

For cost there are two items. estimated-thread-cost shows an estimate in USD for the current thread. thread-credits shows credits. Both descriptions in the source say "Enterprise workspaces only; omitted when unavailable". The source puts the same gate on workspace-headline. A test snapshot in the repo renders the pair as 5.2 credits · ~$0.21. I have not seen either item on a real screen.

Can I run a custom script in the Codex status line?

Not in 0.163.0. The [tui] config struct has two status line fields. One is the list. One is the color switch. Neither runs anything. I tried a table with a command key through the CLI. Codex refused it at load:

Error: failed to load bootstrap configuration

Caused by:
    invalid type: map, expected a sequence
    in `tui.status_line`

Issue #17827, "Customizable status line", asks for a command that gets session JSON on stdin. It has 206 thumbs-up as of 25 October 2026. Two later requests, #20043 and #20244, were closed as duplicates. I compared main from 23 October with the tag. No command field there either.

What about a "codex statusline plugin"? The status line code in 0.163.0 has no plugin entry point. I did not review third-party projects.

Is the Codex status line multiline?

No. The footer takes one Line value. Codex builds one row of items joined by ·. There is no line-break item and no key for a second row. The row is also shared. Hints like the quit reminder take it over while they need it.

If you want more on screen, the terminal title is a separate surface. /title sets it. It saves to tui.terminal_title.

Codex status line vs Claude Code statusLine

Claude CodeCodex CLI
SettingstatusLine in settings.jsontui.status_line in config.toml
What fills the barYour script's stdoutBuilt-in items you pick
Custom textYesNo
CostWhatever your script prints from the cost fieldestimated-thread-cost, Enterprise only
Setup command/statusline writes a script/statusline opens a picker

opencode is a third case. The opencode statusline post covers what exists there.

What I tested on Codex 0.163.0

On 25 October 2026 at 03:46 CET I ran codex -c 'tui.status_line=[...]' features list in an empty temp folder. CODEX_HOME pointed at an empty temp directory. My own config stayed out of it. A valid array loaded with exit code 0. So did []. So did an unknown ID, cost-usd, with no error. That check happens later, in the TUI. A plain string failed with "expected a sequence", exit code 1. null failed the same way.

That proves the type check, not what the footer draws. I use Codex every day as a worker next to Claude Code. For this post I did not open the TUI.

Frequently asked questions

Where is the Codex status line config?

Open ~/.codex/config.toml and find the [tui] table. status_line goes there. With CODEX_HOME set, Codex reads config.toml from that folder instead. The full map of that file is in Codex config.toml.

How do I hide the Codex status line?

Set status_line = [] under [tui]. Or untick every item in /statusline. Do not write null. TOML cannot hold it.

Can the Codex status line show the git branch?

Yes. Add git-branch. It hides outside a repo. pull-request-number and branch-changes sit next to it.

Why does Codex say "Ignored invalid status line item"?

Codex found an ID it does not know. In my test cost-usd loaded without a word. The check comes later, in the TUI. A typo does it too, or a name from a newer build. The bad ID is skipped. Every other item still renders.

The verdict

The Codex status line is a menu, not a canvas. For model, context and limits the 31 items are enough. For your own numbers they are not. Watch #17827. Till then the picker in /statusline is all you get, so pick the few items you read every day.

I read the Codex config reference, the slash commands page, issue #17827 and the openai/codex source at tag rust-v0.163.0 on 25 October 2026. The CLI checks ran on my Mac.