
A status line that shows budget use, with made-up data.
These cases are covered on other pages:
- A notice across the top of the app window, with no program to install: set the
bannerkey - Your own message when your gateway blocks a user at a spend limit: see Block requests at a spend limit
Turn on the status line
The status line requires Claude Desktop 4.4212.0 or later and is off until you set thesessionStatusLine key. The status line isn’t available on a self-hosted install.
1
Install the program
Put the program where users can’t change it. Claude Desktop runs it only from a location that meets these rules:
- macOS and Linux: root owns the file and every parent folder, with no write access for group or others
- Windows: the file is under
Program FilesorProgram Files (x86)on the drive where Windows is installed
status-line and run these commands in your terminal:2
Set the key
Set the key’s In JSON, double each backslash in a Windows path:Add the key to the same configuration source as your other keys.
command field to the program’s full path, with no arguments or shell syntax:- macOS profile or Windows registry: write the value as a JSON string
- Bootstrap server: the key applies after the user approves it in a dialog, unless the device trusts the server’s values without prompting
3
Restart Claude Desktop and check the line
Quit and reopen Claude Desktop, then open an existing session, or start a new one and send a message. The line appears above the message box.
Write the status line program
Claude Desktop starts the status line program with no arguments and no window, as the user who runs Claude Desktop.-
File type: on macOS and Linux, an executable file, such as a compiled program or a script that starts with
#!. On Windows, an.exefile or a.ps1,.cmd, or.batscript. A.ps1script runs in Windows PowerShell, not PowerShell 7. -
Input: one line of JSON on standard input, with the session ID and the model. A field with no value is left out, so handle a missing
model. - Output: the first non-empty line of standard output, up to 200 characters. Markup and links show as plain text. A line wider than the message box ends in ”…” and shows in full on hover.
-
Colors: text is gray by default. ANSI codes
31to36and91to96show red, green, yellow, blue, magenta, and cyan, in shades that fit the light or dark theme, and0or39returns to gray. Other colors show gray, and codes such as bold have no effect. -
Paths: the working directory is
/(System32on Windows).PATHis/usr/bin:/bin:/usr/sbin:/sbin, or the System32, Windows, and Windows PowerShell folders on Windows, so call other tools by their full path. -
Environment: the app’s variables, minus
ANTHROPIC_*,CLAUDE_*,ELECTRON_*, and variables that make an interpreter load code, such asPYTHONPATH. - Time limit: 10 seconds, after which Claude Desktop stops the program and anything it started. On Windows, the time PowerShell takes to start counts toward the limit.
Sample status line programs
Both samples print a budget line,■■■■■■■■□□ 82% of $500 used this month. The macOS and Linux sample reads its numbers from a file that your own scheduled job keeps up to date. The Windows sample prints fixed numbers and shows how a PowerShell script prints UTF-8, reads the input, and writes the escape character.
- macOS and Linux
- Windows
When the status line updates
Claude Desktop runs the status line program at these moments:- A session opens
- Claude finishes a turn
- The user picks another model
- The app regains focus
Troubleshoot a missing status line
Searchmain.log in the logs directory on the user’s device for sessionStatusLine. One entry can stand for many failures of the same kind, and the entries don’t include the program’s output.
was not run: fix the cause the entry gives, such as a folder that users can write to or a Windows path outsideProgram Filesended with exit code 127: a command that the script runs wasn’t found, so call each tool by its full pathwas stopped after 10 seconds: the program hit the time limit. On Windows, a.ps1script can be slow to start in the first minutes after Claude Desktop first launches. If the line appears after a later turn ends or the app regains focus, nothing needs fixing.- No entry: the program printed nothing, which isn’t logged, or the key hasn’t reached the app. Restart Claude Desktop and check which configuration source applies.