I would want to see how full the context window is without typing a command to find out.
Run /statusline and describe what you want in plain words. Claude Code writes a script into ~/.claude/ and updates your settings itself.
/statusline show model name and context percentage with a progress bar
Under the hood, it is a statusLine entry in settings.json. Claude Code pipes JSON about the session to your command on stdin, and whatever the command prints becomes the bar. A one-liner is enough:
{
"statusLine": {
"type": "command",
"command": "jq -r '\"[\\(.model.display_name)] \\(.context_window.used_percentage // 0)% context\"'"
}
}
The JSON includes the model and context_window.used_percentage. Add refreshInterval (in seconds) if you show something time-based, like a clock.
I like a status line for context usage because I no longer have to check. A number on screen all the time tells you when to compact before the window is full, instead of finding out from a warning. And since it is just a script, you can show anything a shell command can print, like the git branch or a clock.
The caveat: with a custom status line, Claude Code stops showing some footer hints such as ? for shortcuts. To remove it again, ask /statusline to delete it.
Further reading: Customize your status line – Claude Code docs, On this site: /context shows what is eating your Claude Code context window, On this site: /branch lets you try another direction without losing this conversation