Omniscio

OmniscioGuidesStatus line examplesTwo rows

Claude Code status line with two rows

This is the example Anthropic opens its own status line page with โ€” the one in the screenshot at the top of that page โ€” written out in full. Two rows is where a status line stops being a label and starts being a dashboard, and it is also where the rendering problems begin.

Checked against Claude Code 2.1.332 documentation, November 25, 2026. By the Omniscio team. Updated .

What it shows

Two rows. The first is where you are and what you are working on; the second is how much has been spent getting there.

[Opus] ๐Ÿ“ my-app | ๐ŸŒฟ feature/login
โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–‘โ–‘โ–‘ 78% | $1.84 | โฑ๏ธ 21m 40s

The bar changes colour with the number: green below 70 percent, yellow from 70 to 89, red from 90 up. In the sample above, 78 percent puts it in yellow, and seven of the ten blocks are filled because the script divides the percentage by ten.

The branch appears only inside a git repository. The script tests for one and drops the segment rather than printing an empty one.

Two rows cost you terminal height rather than width, which is the trade worth making: packing all of this onto one row makes it far more likely to run past the width Claude Code leaves you.

The full script

Save this as ~/.claude/statusline.sh and make it executable with chmod +x. It is Anthropic's display multiple lines example, whole, without the comments the documentation carries.

#!/bin/bash
input=$(cat)

MODEL=$(echo "$input" | jq -r '.model.display_name')
DIR=$(echo "$input" | jq -r '.workspace.current_dir')
COST=$(echo "$input" | jq -r '.cost.total_cost_usd // 0')
PCT=$(echo "$input" | jq -r '.context_window.used_percentage // 0' | cut -d. -f1)
DURATION_MS=$(echo "$input" | jq -r '.cost.total_duration_ms // 0')

CYAN='\033[36m'; GREEN='\033[32m'; YELLOW='\033[33m'; RED='\033[31m'; RESET='\033[0m'

if [ "$PCT" -ge 90 ]; then BAR_COLOR="$RED"
elif [ "$PCT" -ge 70 ]; then BAR_COLOR="$YELLOW"
else BAR_COLOR="$GREEN"; fi

FILLED=$((PCT / 10)); EMPTY=$((10 - FILLED))
printf -v FILL "%${FILLED}s"; printf -v PAD "%${EMPTY}s"
BAR="${FILL// /โ–ˆ}${PAD// /โ–‘}"

MINS=$((DURATION_MS / 60000)); SECS=$(((DURATION_MS % 60000) / 1000))

BRANCH=""
git rev-parse --git-dir > /dev/null 2>&1 && BRANCH=" | ๐ŸŒฟ $(git branch --show-current 2>/dev/null)"

echo -e "${CYAN}[$MODEL]${RESET} ๐Ÿ“ ${DIR##*/}$BRANCH"
COST_FMT=$(printf '$%.2f' "$COST")
echo -e "${BAR_COLOR}${BAR}${RESET} ${PCT}% | ${YELLOW}${COST_FMT}${RESET} | โฑ๏ธ ${MINS}m ${SECS}s"

The script needs jq installed โ€” a separate download from jqlang.org that is not on a stock Mac. Check with jq --version first: without it the model and percentage come back empty while the cost and timer fall back to zero, which reads as a layout bug rather than a missing dependency.

The two echo lines at the end are the answer to "how do I make it multi-line": each one prints a row. Everything above them is preparing strings.

The -e on each echo is what makes the colour variables print as colours instead of as literal backslash text.

The settings entry

In ~/.claude/settings.json, or a project's .claude/settings.json โ€” added beside whatever the file already holds, not pasted over it. There is nothing here about rows: the number of rows is decided by the script, not by the settings. Save the file and Claude Code runs the script straight away.

{
  "statusLine": {
    "type": "command",
    "command": "~/.claude/statusline.sh",
    "padding": 1
  }
}

padding adds horizontal spacing in characters to every row. It is extra spacing on top of what the interface already adds, so think of it as indenting your own block rather than pushing it away from the terminal edge. It also eats width: subtract twice its value when you work out how wide a row can be.

If your branch or timer matters to you, add refreshInterval to the same object โ€” "refreshInterval": 10 for ten seconds. The event triggers can go quiet while the session is idle, and a two-row block makes a stale second row more obvious than a single row does.

On Windows the path takes forward slashes. The PowerShell page in this set is where that trap is explained in full.

What each field means

This script reads more of the payload than any other in the set, because it is several rows' worth of information. The table covers every field it reads from the payload, the one it gets from git instead, and the two environment variables that size a two-row block. The branch and the bar are each covered in depth on their own page.

What the two-row script reads, and what each field holds.
FieldWhat it holds
model.display_nameThe model's display name, in cyan on the first row
workspace.current_dirThe directory you are in now; the script keeps the last segment of it for the folder name
context_window.used_percentageA percentage Claude Code has already calculated from input tokens only. It drives both the bar width and its colour
cost.total_cost_usdAn estimate at list price unless a modelPricing table is in effect, which may differ from your bill and resets to $0 when /clear starts a new session
cost.total_duration_msWall-clock time the session has been running, in milliseconds, accumulated across resumes and excluding time while it was not running
COLUMNS, LINESNot JSON: the terminal size, set before each run. Two rows of text are where these stop being optional
the git branchNot a JSON field for an ordinary session. The script runs git branch --show-current itself, which is why the branch is covered fully on the git branch page

The bar arithmetic is the simplest version of the trick: PCT / 10 divides to a whole number and that many blocks are filled, and the remaining characters are filled with the pale block. The bar is always exactly ten characters, whatever the percentage.

Where this script differs from its siblings is the colour thresholds. Green under 70, yellow from 70 to 89, red from 90 are Anthropic's own choices in this example. They are not a recommendation from Claude Code โ€” they are just the numbers the example uses.

How to confirm it renders

Pipe mock JSON in and count the lines. Two lines out means the script is right; anything else is the script and nothing to do with Claude Code.

echo '{"model":{"display_name":"Opus"},"workspace":{"current_dir":"/home/you/my-app"},"context_window":{"used_percentage":78},"cost":{"total_cost_usd":1.84,"total_duration_ms":1300000},"session_id":"test"}' | ~/.claude/statusline.sh

Those numbers are chosen to land in the middle of the yellow band, so the colour rule is under test as well as the layout. The branch segment is the one part the mock cannot supply: the script asks git in the folder the script runs in, so run the test from a repository to see it, and expect no segment at all outside one.

Then check the width. Anthropic's guidance is to keep a line at least four columns narrower than the terminal โ€” COLUMNS minus four, and another two columns off for each point of padding you set. If a line runs past that, output may get truncated or wrap awkwardly.

If a row is missing rather than cut off, claude --debug shows the script's stderr and its exit code, and a non-zero exit means Claude Code drew no rows at all.

The common failure

Escape sequences and multiple rows are the one combination Anthropic warns about directly. Complex escape sequences such as ANSI colours can occasionally cause garbled output when they overlap other UI updates, and multi-line status lines with escape codes are more prone to rendering issues than single-line plain text.

The documented fix is the one people skip: simplify the script to plain text output first. A two-row plain-text block that renders proves the data is right, and then you add colour back a piece at a time.

The second failure is not the script at all. Outside fullscreen rendering, notifications occupy the same row as your status line, on the right, and a notification that does not fit moves to a row below. So a row that appears and disappears is usually a notification arriving, not your script.

What you see, and what is actually happening.
What you seeWhat is happening
One row instead of twoThe second echo is missing from your copy, or a condition above it never runs. A script that exits non-zero would blank the row entirely, so a single row is a logic problem rather than a failure
Text where a colour should beThe -e is missing from an echo, so the escape codes print literally
Garbled or overlapping charactersEscape sequences overlapping other UI updates. Drop to plain text and add colour back one piece at a time
The line ends in an ellipsisThe row is wider than COLUMNS minus four. Shorten the folder segment or drop a metric
A notification appears over your rowsOutside fullscreen rendering notifications share the status line's row on the right, and one that does not fit moves to a row below

Build it from the single-row versions

Three of the scripts below are the pieces this one is built from โ€” the branch line, the bar, and the cost. If a row is not behaving, start from the page that owns it and add the rest back. The other two are alternatives rather than parts of it.

Where Omniscio fits

The status line is Claude Code's own, and nothing on this page 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, while 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.

The script is Anthropic's display multiple lines example reproduced in full. It was not written for this page and not run on our machine; where the page says what it prints, it is following the example's own logic.

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, what a script can output including multiple lines, the size variables, the display multiple lines example, the full JSON and every field, and the troubleshooting section
  • Settings reference: the statusLine entry, its padding field and its defaults
  • The changelog: release 2.1.332, the newest listed
  • jq: the JSON parser the script calls

Omniscio's own pages, for what this section says about this app:

Common questions

How do I make a multi-line Claude Code status line?

Print more than one line. Each echo or print statement in your script displays as a separate row, so the second row is a second echo and nothing else in the settings has to change.

Why does my multi-line status line look garbled?

Complex escape sequences such as ANSI colours and OSC 8 links can occasionally produce garbled output when they overlap other UI updates, and Anthropic notes that multi-line status lines with escape codes are more prone to it than single-line plain text. If you see corrupted text, simplify to plain text output and add one thing back at a time.

Why did my second row disappear?

Claude Code displays the script's output only after it exits with code 0, so a script that fails part way shows nothing at all rather than the rows it managed to print. Outside fullscreen rendering, notifications also share the status line's row, and one that does not fit beside it moves to a row below.

How wide can a two-row status line be?

At least four columns narrower than the terminal, and another two columns off for each point of padding you set. Claude Code puts the width in the COLUMNS environment variable before each run, and those four columns are the spacing it adds on each side.

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.