Follow Discord
Sweep 03 Nov 2026 · 22:27Z Build v2.1.318 536 read Stable v2.1.311 Latest v2.1.318 Next v2.1.318 Feeds RSS JSON llms.txt llms-full.txt Unofficial
One change · claude-docs

Show a status line changedthird-party/claude-desktop/status-line

Nearest release: v2.1.318, published 3 hours after upstream edited the page. Shown because the two are within 24 hours of each other. Nothing here says the release caused the edit.

Upstream edited this page at 3 Nov 2026 18:41 UTC, give or take a minute or two: the time comes from Anthropic’s own sitemap rather than from a commit. This site recorded the change at 3 Nov 2026 19:07 UTC.

Upstream edited
Recorded here
Lines+60added
Lines−13removed
From line 56 where the diff opens
First seen 29 Oct 2026 this site's first read of the page
Recorded edits4to this page, all time

### Status line scripts on Windows

The whole hunk

from line 56, old and new numbered
/
lines
from line 56
5656* **macOS profile or Windows registry**: write the value as a [JSON string](https://claude.com/docs/third-party/claude-desktop/configuration-format.md#value-types-in-a-profile-or-registry-policy)
5757* **Bootstrap server**: the key applies after the user approves it in a dialog, unless the device [trusts the server's values without prompting](https://claude.com/docs/third-party/claude-desktop/bootstrap.md#keys-that-require-user-consent)
5858 
59If one configuration serves several operating systems, such as a bootstrap server's response, add `platformOverrides` with a `command` under `win32` (Windows), `darwin` (macOS), or `linux`. In a macOS profile, a Windows registry policy, or the [Linux configuration file](https://claude.com/docs/third-party/claude-desktop/configuration-format.md#the-linux-configuration-file), set only `command`. Versions before 4.16336.0 reject the whole key and show no status line, so add `platformOverrides` only after every device has updated. The top-level `command` is required and runs on any system you don't list:
60 
61```json theme={null}
62{
63 "sessionStatusLine": {
64 "command": "/opt/example/bin/status-line",
65 "platformOverrides": {
66 "win32": { "command": "C:\\Program Files\\Example\\status-line.ps1" }
67 }
68 }
69}
70```
71 
5972**3. Restart Claude Desktop and check the line**
6073 
6174Quit 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.
6275 
76On Claude Desktop 4.16336.0 or later, if [`inferenceModelPricingEnabled`](https://claude.com/docs/third-party/claude-desktop/configuration#inferencemodelpricingenabled) is also on, the status line replaces the "Session cost (estimate)" line.
77 
6378## Write the status line program
6479 
6580Claude Desktop starts the status line program with no arguments and no window, as the user who runs Claude Desktop.
6681 
67* **File type**: on macOS and Linux, an executable file, such as a compiled program or a script that starts with `#!`. On Windows, an `.exe` file or a `.ps1`, `.cmd`, or `.bat` script. A `.ps1` script runs in Windows PowerShell, not PowerShell 7.
82* **File type**: on macOS and Linux, an executable file, such as a compiled program or a script that starts with `#!`. On Windows, an `.exe` file or a `.ps1`, `.cmd`, or `.bat` script.
6883 
6984* **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`.
7085 
from line 87
7287 {"session_id":"local_1f0c2a9e-7b3d-4c58-9a16-5e2d8b40c7f3","model":{"id":"claude-sonnet-4-5","display_name":"Claude Sonnet 4.5"}}
7388 ```
7489 
75* **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.
90* **Output**: the first non-empty line of standard output, read as UTF-8, 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.
7691 
77* **Colors**: text is gray by default. ANSI codes `31` to `36` and `91` to `96` show red, green, yellow, blue, magenta, and cyan, in shades that fit the light or dark theme, and `0` or `39` returns to gray. Other colors show gray, and codes such as bold have no effect.
92* **Colors**: text is gray by default. ANSI codes `31` to `36` and `91` to `96` show red, green, yellow, blue, magenta, and cyan, and `0` or `39` returns to gray. Other colors show gray, and codes such as bold have no effect.
7893 
7994* **Paths**: the working directory is `/` (`System32` on Windows). `PATH` is `/usr/bin:/bin:/usr/sbin:/sbin`, or the System32, Windows, and Windows PowerShell folders on Windows, so call other tools by their full path.
8095 
81* **Environment**: the app's variables, minus `ANTHROPIC_*`, `CLAUDE_*`, `ELECTRON_*`, and variables that make an interpreter load code, such as `PYTHONPATH`.
96* **Environment**: the app's variables, minus `ANTHROPIC_*`, `CLAUDE_*`, `ELECTRON_*`, `GIT_*`, and variables that change which code a program loads, such as `PYTHONPATH` or `LD_LIBRARY_PATH`.
8297 
83* **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.
98* **Time limit**: 10 seconds, after which Claude Desktop stops the program and anything it started.
8499 
100### Status line scripts on Windows
101 
102A `.ps1` script runs in Windows PowerShell, not PowerShell 7.
103 
104* **Execution policy**: if Group Policy allows only signed scripts, sign the `.ps1` script with a certificate that each device trusts, and add it to each device's Trusted Publishers store. If Group Policy turns scripts off, use a `.cmd` or `.exe` file.
105* **Encoding**: a script must print UTF-8, or characters outside ASCII can show as "�" or "?". In a `.ps1` script, set UTF-8 output in the first statement, as the [Windows sample](#sample-status-line-programs) does, and save the file as UTF-8 with BOM. In a `.cmd` or `.bat` script, put `chcp 65001 >nul` right after `@echo off`, and save the file as UTF-8 without BOM.
106 
85107### Sample status line programs
86108 
87Both 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.
109Both samples print a budget line, `■■■■■■■■□□ 82% of $500 used this month`.
88110 
89111> [tab] macOS and Linux
90112>
from line 169
147169 
148170There's no timer, so new data shows the next time one of these happens.
149171 
150If the program fails, prints nothing, or takes longer than 10 seconds, the line disappears and the user sees no error. The next successful run brings the line back.
172If the program exits with a code other than 0, prints nothing, or takes longer than 10 seconds, the line disappears and the user sees no error. The next successful run brings the line back.
151173 
152174## Troubleshoot a missing status line
153175 
154Search `main.log` in the [logs directory](https://claude.com/docs/third-party/claude-desktop/data-storage.md#where-data-lives) 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.
176Search `main.log` in the [logs directory](https://claude.com/docs/third-party/claude-desktop/data-storage.md#where-data-lives) on the user's device for `sessionStatusLine`. Claude Desktop doesn't log every failure of the same kind, so restart it after each fix. The entries don't include the program's output.
155177 
178* **`Failed to parse managed config`** or **`was not applied`**: Claude Desktop rejected the whole key. A `Failed to parse` entry says what is wrong. A version before 4.16336.0 logs `sessionStatusLine.platformOverrides ignored`, so update that device.
156179* **`was not run`**: fix the cause the entry gives, such as a folder that users can write to or a Windows path outside `Program Files`
157* **`ended with exit code 127`**: a command that the script runs wasn't found, so call each tool by its full path
158* **`was stopped after 10 seconds`**: the program hit the [time limit](#write-the-status-line-program). On Windows, a `.ps1` script 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.
180* **`ended with exit code`**: any code other than 0 hides the line, even if the program printed one
181 * **macOS and Linux**: code 127 means that a command the script runs wasn't found, so call each tool by its full path
182 * **Windows**: a `.ps1` script that an [execution policy](#status-line-scripts-on-windows) blocks ends with code 1
183* **`was stopped after 10 seconds`**: the program hit the [time limit](#write-the-status-line-program). On Windows, a `.ps1` script can be slow to start for a few minutes after a user first opens Claude Desktop, and a `.cmd` or `.exe` file starts faster. If the line appears after a later turn ends or the app regains focus, nothing needs fixing.
159184* **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](https://claude.com/docs/third-party/claude-desktop/configuration-format.md#which-configuration-source-applies-on-a-device).
185 
186To see the program's own error messages, run it in a new terminal window with Claude Desktop's working directory and `PATH`:
187 
188> [tab] macOS and Linux
189>
190> ```bash theme={null}
191> cd /
192> echo '{"session_id":"test"}' | env -i HOME="$HOME" PATH=/usr/bin:/bin:/usr/sbin:/sbin /opt/example/bin/status-line
193> echo "exit code: $?"
194> ```
195 
196> [tab] Windows
197>
198> Paste these lines into PowerShell. They start a `.ps1` script with Claude Desktop's options and module path:
199>
200> ```powershell theme={null}
201> Set-Location "$env:SystemRoot\System32"
202> $env:PATH = "$env:SystemRoot\System32;$env:SystemRoot;$env:SystemRoot\System32\WindowsPowerShell\v1.0"
203> $env:PSModulePath = "$env:SystemRoot\System32\WindowsPowerShell\v1.0\Modules;$env:SystemRoot\System32\WindowsPowerShell\v1.0\Modules"
204> '{"session_id":"test"}' | powershell.exe -NoProfile -NonInteractive -ExecutionPolicy Bypass -File "C:\Program Files\Example\status-line.ps1"
205> "exit code: $LASTEXITCODE"
206> ```
160207 
Feedback