Original URL: https://getagenttools.com/blog/codex-statusline/

# Codex statusline: tui.status\_line, its 31 items, and no script hook

27 Oct 2026Marek.

- 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.

 

```toml
[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](https://getagenttools.com/blog/statusline-claude-code/) 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](https://learn.chatgpt.com/docs/cli/slash-commands) 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](https://getagenttools.com/blog/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.

 

| Group | Item IDs |
| --- | --- |
| Model | `model`, `model-with-reasoning`, `reasoning`, `fast-mode` |
| Context | `context-used`, `context-remaining`, `context-window-size` |
| Limits | `five-hour-limit`, `weekly-limit` |
| Tokens and cost | `used-tokens`, `total-input-tokens`, `total-output-tokens`, `thread-credits`, `estimated-thread-cost` |
| Place | `current-dir`, `project-name`, `hostname` |
| Git | `git-branch`, `pull-request-number`, `branch-changes` |
| Thread | `thread-name`, `thread-title`, `thread-id`, `run-state`, `task-progress`, `raw-output`, `daybreak`, `workspace-headline` |
| Safety | `permissions`, `approval-mode` |
| Other | `codex-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](https://learn.chatgpt.com/docs/config-file/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":

 

```text
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](https://getagenttools.com/blog/what-is-an-ai-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](https://getagenttools.com/blog/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:

 

```text
Error: failed to load bootstrap configuration

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

 

[Issue \#17827](https://github.com/openai/codex/issues/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 Code | Codex CLI |
| --- | --- | --- |
| Setting | `statusLine` in `settings.json` | `tui.status_line` in `config.toml` |
| What fills the bar | Your script's stdout | Built-in items you pick |
| Custom text | Yes | No |
| Cost | Whatever your script prints from the `cost` field | `estimated-thread-cost`, Enterprise only |
| Setup command | `/statusline` writes a script | `/statusline` opens a picker |

 

opencode is a third case. The [opencode statusline](https://getagenttools.com/blog/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](https://getagenttools.com/blog/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](https://learn.chatgpt.com/docs/config-file/config-reference), the [slash commands page](https://learn.chatgpt.com/docs/cli/slash-commands), [issue \#17827](https://github.com/openai/codex/issues/17827) and the [openai/codex](https://github.com/openai/codex) source at tag `rust-v0.163.0` on 25 October 2026. The CLI checks ran on my Mac.

Put this into practice

[See the tool list](https://getagenttools.com/tools/)[Train your team](https://getagenttools.com/#training)
