ServicesAboutNotesContact Get in touch →
EN FR
Note

Claude Code Status Line Configuration

How to set up Claude Code's status line to display git branch, active model, and context usage — practical setup for analytics engineers

Planted
claude codeai

The status line sits below your input in Claude Code, displaying contextual information at a glance. Configuring it takes a minute and saves you from repeatedly checking your git branch, active model, or context usage manually.

Setting It Up

Run the /statusline command inside a Claude Code session:

/statusline

This opens an interactive setup. You can describe what you want in natural language:

Configure my status line to show: git repo:branch | Model | Context used as % bar

Claude reads your shell configuration and sets it up. The result looks something like:

dbt-project:feature/new-attribution | Sonnet 4.5 | [█░░░░░░░░] 6.8%

What to Display

For analytics engineering work, a practical status line includes:

Git Branch

Knowing your current branch without running !git branch --show-current every time. This is especially useful when you’re working across multiple feature branches in a session — switching between a model development branch and a hotfix branch, for instance.

Active Model

Which model you’re currently using. When you switch between Sonnet and Opus during a session, the status line confirms the switch happened. Without it, you might think you’re on Opus when you’re still on Sonnet, or vice versa.

Context Usage

The percentage of Claude’s context window that’s consumed by your conversation history. This is the most operationally useful indicator. When context usage climbs above 60-70%, Claude starts losing track of earlier parts of the conversation. The [[Claude Code CLI Basics|/compact command]] summarizes the conversation to free up space.

A context bar gives you early warning. If you see it climbing toward 50%, that’s the signal to compact proactively rather than waiting for Claude to start forgetting things.

Token Cost (API Users)

If you’re on API billing rather than a subscription, adding running token cost to the status line keeps spending visible:

Configure my status line to show: git branch | Model | Context % | Session cost

This displays something like:

feature/attribution | Opus | [████░░░░░] 42% | $0.85

Useful for budget-conscious sessions or when you’re working on a client project with billing constraints.

Customizing Later

The status line configuration persists across sessions. If you want to change it, run /statusline again. You can add or remove elements, change the format, or adjust the display.

Some analytics engineers add project-specific information:

Configure my status line to show: dbt project name from dbt_project.yml | git branch | Model | Context %

This pulls the project name dynamically, which is helpful if you work across multiple dbt projects and want immediate confirmation of which one you’re in.

Why It Matters

The status line provides ambient awareness of branch, model, and context usage without interrupting work. For analytics engineers switching between client projects, the combination of project name and git branch prevents the common mistake of building models on the wrong branch or modifying files in the wrong project directory. The context usage indicator is particularly useful during complex debugging sessions, where running /compact at 50% produces better summaries than waiting until 90%.