Build a status line row of your own
When the default row shows more or less than you want, build a row of your own from the JSON fields of smllm statusline. You read the fields with jq and print the row with printf.
Before you begin
- A status line script that Claude Code runs, as in Show smllm in your status line.
jqis installed.
Steps
-
Read the fields of the session into a variable, in your status line script:
s=$(printf '%s' "$input" | smllm statusline --json)$inputis the status JSON that your script read from stdin. The status line row lists each field. -
Print the row from the fields. This row shows only the state, in bold yellow:
state=$(jq -r '.state // empty' <<<"$s") if [ -n "$state" ]; then printf '\n\033[1;33m%s\033[0m' "$state"; fiThis one puts the state and the instance on the same row as your other fields, and shows nothing when the session is idle:
where=$(jq -r 'select(.state) | "\(.state) \(.instance.label)"' <<<"$s") printf '%s%s' "$my_other_fields" "${where:+ | $where}"This one shows a warning colour while the agent has yielded:
if [ "$(jq -r '.yielded' <<<"$s")" = true ]; then printf '\n\033[43;30m waiting for you \033[0m' fi