OmniscioGuidesStatus line examples
Claude Code status line examples you can copy whole
A status line is a shell command Claude Code runs and displays, fed with a JSON description of your session. These are the five shapes people actually build, each written out in full on its own page from Anthropic's own examples, with the reasoning that makes it work. This page is the shared part: the setting, the JSON every one of them reads, and how to check a row renders.
| You want to see | The page for it |
|---|---|
| The branch you are on and what is changed | Model, folder and git branch |
| How much of the context window is spent | A context usage bar |
| What this session has cost so far | Cost so far |
| The same, natively on Windows | PowerShell on Windows |
| Several of these at once | Two rows |
Checked against Claude Code 2.1.332 documentation, November 25, 2026. By the Omniscio team. Updated .
What every one of them needs
A status line is one settings field. statusLine is an object whose type is "command" and whose command is a script path or an inline shell command. It can live in your user settings at ~/.claude/settings.json, or in a project's settings file. With nothing set there is no row at all.
{
"statusLine": {
"type": "command",
"command": "~/.claude/statusline.sh",
"padding": 2,
"refreshInterval": 10
}
}Three optional fields are worth knowing before you pick a script. padding adds horizontal spacing in characters. refreshInterval re-runs the command every N seconds on top of the event-driven updates, with a minimum of 1. hideVimModeIndicator suppresses the built-in insert-mode text when your script draws vim mode itself.
The four Bash scripts in this set call jq, a command-line JSON parser you may need to install — it is a separate download from jqlang.org, and it is not on a stock Mac. Check for it with jq --version before you blame your script for an empty row. Python and Node.js have JSON parsing built in, so Anthropic's examples also carry those two languages; this set publishes the Bash ones because they are the shortest to read.
The snippets here and on the pages that follow are the statusLine object on its own. If ~/.claude/settings.json already exists and holds other keys, add this object beside them inside the same braces; it is not a whole file to paste over.
Claude Code reloads settings and runs the script as soon as you save the file. There is nothing to restart.
What the JSON input contains
Every script on these pages gets the same object on stdin, and reads whichever parts it needs. This is the whole set of fields a short status line usually reaches for.
| Field | What it holds |
|---|---|
model.id, model.display_name | The model's identifier and its display name. display_name is the one to print |
workspace.current_dir, workspace.project_dir | The directory you are in now, and where Claude Code was launched. They differ once the working directory changes mid-session. Claude Code prefers current_dir over the duplicate cwd |
workspace.added_dirs | Extra directories added with /add-dir or --add-dir, empty if there are none |
workspace.git_worktree | The worktree's name when you are inside a linked worktree. Present for any linked worktree, unlike worktree.*, which exists only in a Claude Code worktree session |
workspace.repo.host, owner, name | The repository identity parsed from the origin remote, absent outside a git repository or when no origin is configured |
cost.total_cost_usd | Estimated session cost, computed on your machine at list price unless a modelPricing table is in effect. It may differ from your bill, and it resets to $0 when /clear starts a new session |
cost.total_duration_ms, total_api_duration_ms | Wall-clock time the session has been running, and the part of it spent waiting for API responses |
cost.total_lines_added, total_lines_removed | Lines of code changed |
context_window.used_percentage, remaining_percentage | Percentages Claude Code has calculated for you, from input tokens only. They may be null early in a session |
context_window.context_window_size | The size of the current window in tokens. A script that computes a percentage itself divides by this rather than by a fixed number |
context_window.total_input_tokens, total_output_tokens | The tokens in the window as of the most recent API response. Input includes cache reads and writes |
context_window.current_usage | The same counts broken out. It is null until the conversation has an API response, and null or all zeros after /compact until the next call |
exceeds_200k_tokens | Whether the last response's total passed 200k, a fixed threshold whatever your window size |
rate_limits.five_hour, seven_day | A rolling 5-hour and a weekly window, each with used_percentage from 0 to 100 and resets_at in epoch seconds. Only for a claude.ai Pro, Max or Ultra subscriber, or behind a Claude apps gateway with a spend limit, and only after the first API response |
rate_limits.spend_limit | Behind a gateway, a percentage and reset time, and optionally dollars and a period. Claude Code reads the dollar fields in a separate request about every five minutes, so they can trail the percentage |
prompt_cache | Hit ratio, misses, whether the cache is warm and when it expires. Absent until the first API response |
pr.number, pr.url, pr.review_state | The open pull request for the branch, its review state, and for a GitLab remote the merge request instead. Absent when there is not one |
session_id, session_name | A unique id for the session, and its name — the custom one set with --name or /rename when there is one, otherwise the AI-generated session title. The id is the right key for a cache file |
version, output_style.name, fast_mode, thinking.enabled | The build, the output style and two session switches. The vim, effort and agent objects beside them appear only when they apply |
worktree.name, path, branch | The active Claude Code worktree session. Present only while you are in one, which is why it is not a general-purpose git branch field |
transcript_path | The path to the conversation transcript |
Several fields are absent rather than empty when they do not apply: vim with vim mode off, pr when no pull request is open, rate_limits on an API key. Others are null at particular moments: current_usage before the first API response and again straight after /compact, and the two context percentages early in a session.
Handling both is what stops a blank bar. In jq the fallback is // 0 for a number you still want to print and // empty for a segment that should vanish when it has no value.
How to check any of these scripts renders
Test the script before you trust the setting. Anthropic's tip is to pipe mock JSON into it, and a mock is the only way to see a value you chose rather than a value the session happened to produce.
echo '{"model":{"display_name":"Opus"},"workspace":{"current_dir":"/home/you/my-app"},"context_window":{"used_percentage":25},"session_id":"test"}' | ~/.claude/statusline.shIf that prints the line you expected, the script is right and the setting is the only thing left. If it fails there, it will fail in the row for the same reason.
Inside Claude Code, claude --debug logs the script's stderr on every invocation and its exit code on the first invocation in a session. That separates a script that never ran from one that ran and failed, which are two different problems with the same symptom.
Two more things to look at with a real session in front of you: whether the row updates when you send a message, and whether anything you expected is silently absent because the field does not apply to your login.
The failure every script here can hit
A configured status line shows nothing for one of three documented reasons: the folder is not trusted, the script failed, or a setting switched the row off. They look identical on screen, so work them in this order.
| Check | What to do |
|---|---|
| The folder is trusted | Until you accept the workspace trust dialog the row stays blank. Accept it for the folder or for a parent whose trust extends to it |
| The setting is where you think | Read the file back: a statusLine object, type is command, and the path is the file you edited |
| The script is executable | chmod +x ~/.claude/statusline.sh. A script you run by naming an interpreter, as the PowerShell page does, does not need the bit |
| The script prints to stdout | Output on stderr does not count, and stderr is also where your own debugging disappears |
| The exit code is 0 | Claude Code displays output only after the script exits 0. A non-zero exit, or no output, leaves the row blank |
| The command works outside Claude Code | Run it yourself with mock JSON. If it fails there, it fails in the row for the same reason |
| Windows path separators | With Git Bash installed, an unquoted backslash in command is eaten before the script runs, without an error. Use forward slashes |
| A switch has narrowed it | disableAllHooks outside managed settings, allowManagedHooksOnly, or starting with --safe-mode leaves only a managed statusLine, and with none deployed the row is skipped without warning |
The fastest way through those checks is claude --debug, which logs your script's stderr and its exit code. The second fastest is to assume nothing about the field you are printing: a rate_limits segment on an API key is not broken, it is absent, and the row is reporting exactly that.
Which one to start with
Start with one metric. A row you read at a glance is worth more than a row you have to parse, and every extra field costs terminal width, on a line Claude Code asks you to keep short for exactly that reason.
If you work across branches, the git branch script earns its place fastest. If you keep hitting compaction, the context bar does. If you are watching spend, the cost row does — and it is the one most likely to be misread, so it is worth reading what the figure actually is before you trust it.
Once you know which two numbers you look at, take the two-row script and keep those. It is the same code, with the parts you do not need removed.
For the setting itself rather than the scripts — the update triggers, the rate limit fields, the blank row in depth — the status line guide is the page that owns it.
Where Omniscio fits
The status line is Claude Code's own, and nothing on these pages needs Omniscio. Omniscio is a desktop app for running several Claude Code agents side by side, in one list rather than a wall of terminals.
Its agent sessions run Claude Code in print mode, so they show Omniscio's session list rather than a terminal row. A status line you configure still applies to any claude you run yourself in a terminal.
The features page lists what the app does today.
How this page was checked
Every statement here about Claude Code comes from Anthropic's own documentation, read in its Markdown form on November 25, 2026: the status line page, the settings reference and the changelog. The version line comes from the changelog, whose newest release is 2.1.332, dated November 25, 2026.
Every script in this set is an Anthropic example reproduced in full, not one written for these pages. No status line script was run on our machine to produce any of them, so what these pages say a script prints is what the example is documented to print.
What this page says about Omniscio comes from our own pages. If Anthropic's page and this one ever disagree about Claude Code, Anthropic's page is right, because this part of Claude Code changes on nearly every release.
Sources
- Customize your status line: the setting, the full JSON and every field, what may be absent or null, the update triggers, every example script, the Windows notes and the whole troubleshooting section
- Settings reference: the
statusLineentry and its fields,disableAllHooks,allowManagedHooksOnly,modelPricingand the two status line gates - The changelog: release 2.1.332, the newest listed
- jq: the JSON parser the Bash scripts call
Omniscio's own pages, for what this section says about this app:
- Omniscio's homepage: the product description
- Features: what the app does today
- Claude Code status line: the setting and the payload this page summarizes
Common questions
Where does a Claude Code status line script go?
Anywhere you like. The statusLine setting takes a shell command, so the common pattern is a script in ~/.claude/, made executable, with statusLine.command pointing at it. You can also put the whole command inline in settings, which is enough for a one-field row.
Which of these status line scripts should I start with?
The git branch one, if you work across branches. The context bar, if you keep running out of window. The cost row, if you are watching spend. Start with one; the two-row script is simply several of them stacked, and it is the one to copy once you know which fields you care about.
Why is my status line blank after I add a script?
Claude Code runs the command and shows its output only after it exits with code 0. A script that is not executable, prints to stderr, or fails leaves the row blank; so does an untrusted folder, and so does disableAllHooks or allowManagedHooksOnly narrowing what is allowed to run. Run claude --debug to see the script's stderr and its exit code.
Do these scripts work on Windows?
The Bash ones do when Git Bash is installed, which is what Claude Code uses there when it is present. Write any path in the command with forward slashes, because Git Bash consumes an unquoted backslash. The PowerShell page in this set is the native version that works either way.
Does a status line cost tokens or slow Claude Code down?
It costs no API tokens, because it runs locally. It can cost time: a slow script keeps the row from updating until it finishes, and a new update arriving meanwhile cancels it rather than queueing behind it. Keep the script fast, and cache anything expensive such as repeated git calls.
Run the sessions behind those status lines, from one window
Install Omniscio, keep your Claude Code sessions in one list, and see what each one needs without hunting through terminals. The features page lists what is in it today.