What is a status line? Claude Code, Codex, Cursor, Grok

By

A status line is the row under a coding session that shows the model, context, or a script you wrote. How Claude Code, Codex, Cursor, and Grok Build set it.

A status line is the row at the bottom of a coding-agent session that shows where you are. The model name, how full the context window is, the directory, or a line a script printed.

It is not the transcript. The transcript is every tool call and reply. The status line is one row you can read without scrolling that. How to make coding agents less verbose is about hiding the stream. The status line is what you keep in view instead.

How a status line works

Something in the session changes. A new assistant message, a permission-mode switch, a timer. The tool either fills the row from built-in items, or it runs a command you named. The command reads JSON on stdin and prints the row. The tool paints that text under the transcript.

A script status line runs on your machine. It is not a model call. Claude Code says so directly: the script does not consume API tokens. The row can still show a cost figure, and that figure is an estimate the client computed, which can differ from the bill.

How a status line gets its textA session event happens. Built-in items or a script produce one row. That row sits under the transcript.Session eventBuilt-in items or ascriptOne row under thetranscript

The status line in each tool

Claude Code and Grok Build can run a script. Codex and the Cursor CLI also have a status row. The configuration key is not the same, and Cursor’s changelog names a custom command without documenting the JSON shape.

Claude Code Codex Cursor CLI Grok Build
Default No custom script until you add one Footer items, model with reasoning, context remaining, current directory A running-time toggle exists. The custom command is opt-in Off
Configure /statusline, or statusLine in settings /statusline, saved as tui.status_line /statusline. Changelog says point statusLine at a command [ui.status_line] in ~/.grok/config.toml
Script stdin JSON session data Not a script. You pick item ids Live token usage, per the changelog. The JSON schema is not in the config reference One JSON object
Turn it off /statusline delete, clear, or remove it. Or delete the field /statusline --clear for the session, or status_line = [] Not documented as a JSON key type = "disabled", or remove the section

Claude Code

The bar sits on its own row above the footer badges. It does not replace them. With a custom status line, most footer keyboard hints hide.

/statusline plus a sentence generates a script under ~/.claude/ and updates settings. By hand, add statusLine to ~/.claude/settings.json or to project settings. type is "command". command is a script path or an inline shell command. padding defaults to 0. refreshInterval is optional and at least 1 second. hideVimModeIndicator hides the built-in vim mode text when your script prints vim.mode itself.

The script runs at session start, including a resume, then on a new assistant message, when /compact finishes, when the permission mode changes, when vim mode toggles, when the command changes, on refreshInterval, and when a rate-limit or prompt-cache timestamp in the last payload comes due. Updates debounce for 300ms, except a change to command itself. An in-flight script is cancelled if a newer update arrives. Width comes from COLUMNS and LINES. tput cols does not see the terminal. Output can be multiple lines, ANSI colors, or OSC 8 links. Paste a captured row into the ANSI escape stripper when you want the text without those sequences.

The row hides during the help menu and permission prompts. It stays blank until you accept the workspace trust dialog, because the command runs under the same trust rule as hooks. /statusline delete, /statusline clear, or /statusline remove it clears it. Deleting the statusLine field does too.

Useful fields on stdin include model.display_name, context_window.used_percentage, workspace.current_dir, and cost.total_cost_usd. The cost field is a client-side estimate. It can differ from the bill, and it resets on /clear.

See Claude Code status line.

OpenAI Codex

/statusline opens a picker. You toggle and reorder footer items. The choice persists as tui.status_line in config.toml. Items the command page names include the model, the model plus reasoning, context stats, rate limits, the git branch, token counters, the session id, the current directory or project root, and the Codex version.

/statusline model project-name sets the row for this session only, in that display order. /statusline --clear hides every item for the session.

When status_line is unset, the config sample uses model-with-reasoning, context-remaining, and current-dir. Set it to [] to hide the footer. /title is a different setting, tui.terminal_title, for the terminal window title.

See Codex slash commands and the config sample.

Cursor

The CLI changelog says you can point statusLine at your own command and render its output, with live token usage, in the prompt footer. A later note says a custom statusLine command keeps its throttle during streaming updates and restarts only when the command or the working directory changes. /statusline is the skill that configures the CLI status line.

The CLI configuration reference documents display.showStatusLineRunningTime and display.showStatusIndicators. It does not document a statusLine JSON object. /statusline is the documented way to set the row.

The editor has a separate Tab status indicator, covered in Cursor Tab. /goal can show an active or paused state. That is the goal indicator, not this script row.

See the Cursor CLI changelog, the CLI configuration reference, and Cursor skills for /statusline.

Grok Build

The row is off by default. In the full-screen view it sits above the shortcuts bar. In minimal mode it sits under the prompt info row. It hides on the welcome screen and while a fullscreen subagent view is open.

Config lives only in your user or admin ~/.grok/config.toml, under [ui.status_line]. A cloned repo cannot set it. Restart Grok after an edit. type is builtin, command, or disabled. off, none, and hidden mean the same as disabled. Removing the section disables the row.

Builtin items, in the order you list them, are cwd, model, context, cost, turn-timer, and session-name. If you omit items, the default is cwd, model, and context. The docs’ example render is the directory name, the model name, and a context percentage. context turns amber at the auto-compaction threshold, or at 80% when the agent reports none. cost hides below $0.005. A resumed session counts cost from the resume. turn-timer shows after one second.

command is a script path or an inline shell command. A leading ~/ expands. The recipes are POSIX, tested on macOS and Linux, and untested on Windows. The script gets one JSON object on stdin. Common fields are model.display_name, context_window.used_percentage, workspace.branch, and cwd. Missing fields are omitted. refresh_interval in seconds only applies to type = "command". An idle session does not re-run the script unless that interval is set.

grok inspect reports a bad key. A missing execute bit shows [status line: could not start the script: …]. Other failures say exit N, timed out, or killed by signal. stderr stays hidden unless you run Grok with --debug.

The context window entry points at this percentage. It is off until you add the section.

See Grok Build status line.

Details checked against each vendor’s documentation in November 2026.

A real example

You want Claude Code to show the model and the context percentage, without a script file. The docs’ inline command is this settings object:

{
  "statusLine": {
    "type": "command",
    "command": "jq -r '\"[\\(.model.display_name)] \\(.context_window.used_percentage // 0)% context\"'"
  }
}

jq has to be on your PATH. The same idea in Grok, using built-in items instead of a script, is:

[ui.status_line]
type = "builtin"
items = ["cwd", "model", "context"]

Restart Grok after saving that. Codex’s equivalent is a list of ids:

[tui]
status_line = ["model", "context-remaining", "git-branch"]

When to use a status line

Use it when you keep a session open long enough to lose track of the model, the branch, or how full the context is. The percentage is the number that tells you a compact is coming. The cost figure is the number to glance at during a long run, with the caveat that Claude’s field is an estimate.

Skip a custom script if the built-in items already show what you check. Codex’s picker and Grok’s builtin type exist so you do not have to maintain a shell script. Add a script when you want a field the built-ins do not lay out, or a format you print yourself.

Pitfalls

A status script is a shell command that receives session JSON, including paths and a cost estimate. Claude Code gates it on workspace trust for that reason. Do not point command at a script you have not read.

Claude’s cost.total_cost_usd can disagree with the invoice, and /clear resets the figure the script sees. Grok hides cost below $0.005 and starts the count over on resume. Neither number is the usage page.

Grok will not pick up a status line from the repo you cloned, and it will not pick up an edit until you restart. Cursor’s config reference does not list the statusLine object the changelog talks about, so a JSON block copied from Claude Code is not a documented Cursor setting.

The row is easy to confuse with the terminal title, with Cursor’s Tab indicator, and with a goal’s paused state. Those are separate settings.

  • How to make coding agents less verbose is about the transcript you can stop reading. The status line is the row left on screen.
  • The context window is the percentage a status line is usually there to show.
  • Tokens is how usage and cost are counted, which is the bill a status-line estimate is not.
  • Work Tracebook is a timeline of finished work across the day. It is a different view from the one row inside a live session.
  • Context window: The context window is everything a coding agent can see at once. How to check it, free it and keep it small in Claude Code, Codex, Cursor and Grok Build.
  • Tokens and usage limits: A token is the unit a model reads and writes. A usage limit is how much of that work a plan includes. How Claude Code, Codex, Cursor and Grok count it.
  • Sessions: A session is a saved coding-agent conversation you can resume later. How Claude Code, Codex, the Cursor CLI and Grok Build store, name, resume and fork one.

All AI glossary entries →

Want me to talk about your product? You can sponsor this site.