Install command
Not provided
Claude Code statusline that detects model switches between Opus, Sonnet, and Haiku — shows current tier, total session switch count, and the last few model transitions inline.
Open the source and read safety notes before installing.
Source-backed facts for citing this resource, derived directly from the registry — also available as plain text for AI assistants.
Decision playbook
Signals are present but mixed. Use the checklist below to confirm the source and operational safety for your environment.
0
78
—
No baseline selected
No major trust-signal divergence detected in the current selection.
Confirm ownership and provenance before trusting install instructions.
Source link availableRequired
Open the canonical repository and verify ownership.
Source provenance statusRequired
Marked as source-backed.
Metadata reviewed
Registry metadata indicates a reviewed listing.
Validate risk disclosures before installation or API wiring.
Safety notes presentRequired
Review the listed safety guidance before running commands.
Privacy notes presentRequired
Review data handling notes before connecting accounts or secrets.
Trust level risk gateRequired
Trust level does not block evaluation.
Check package metadata and artifact integrity signals.
Install payload available
Install or copy payload is available for review.
Package verification flag
No package verification flag provided.
Checksum metadata
No checksum provided for downloaded artifact.
Use compare context to validate trade-offs before adoption.
Compare tray has multiple entries
Add at least one more entry to compare trust differences.
Baseline comparison available
No baseline peer selected yet.
Diverging trust signals identified
No major trust-signal divergence found.
Setup at a glance
Copy-ready — paste the snippet to get started.
Install command
Not provided
Config snippet
Provided
Copy snippet
Provided
Prerequisites
6 to clear
Platforms
1 listed
Difficulty
6/100
Adoption plan
Current risk score 16/100. Use staged verification before broader rollout.
Validate source and review signals before any execution.
Confirm source provenanceRequired
Source URL/provenance metadata is present.
Confirm metadata review state
Listing has review metadata.
Verify install payload
Install/config payload exists and can be inspected.
Confirm safety, privacy, and package integrity signals.
Review safety notesRequired
Safety notes are present.
Review privacy notesRequired
Privacy notes are present.
Verify package integrity metadata
No package verification/checksum metadata.
Adopt in controlled steps based on the selected plan.
Run in isolated sandbox firstRequired
Use a constrained sandbox and observe behavior across multiple tasks.
Roll out graduallyRequired
Roll out to a small cohort before wider usage.
Set monitoring and fallback
Define rollback path and monitor errors after adoption.
Evidence readiness
Required evidence gates are covered (5/6 signals complete).
Source repository/provenance is listed.
Required in this preset
Review metadata is present.
Required in this preset
Safety notes are present.
Required in this preset
Privacy notes are present.
Optional in this preset
Package integrity metadata is missing.
Optional in this preset
Install payload is available.
Required in this preset
Required evidence gates are covered for this preset.
Decision timeline
5/6 steps complete with no blocking gaps for this preset.
triage
Source/provenance metadata is available.
triage
Review metadata is available.
verify
Safety notes are available.
verify
Privacy notes are available.
verify
Package integrity metadata is missing.
rollout
Install payload is available.
No required blockers for this timeline preset.
Prerequisite readiness
6 prerequisites to line up before setup.
Safety & privacy surface
2 safety and 1 privacy notes across 3 risk areas. Review closely: credentials & tokens.
#!/usr/bin/env bash
# Model Switch History Tracker for Claude Code
# Tracks transitions between Claude models (Opus, Sonnet, Haiku)
# Read JSON from stdin
read -r input
# Extract current model info
current_model=$(echo "$input" | jq -r '.model.display_name // "unknown"')
session_id=$(echo "$input" | jq -r '.session_id // "unknown"')
# Model history tracking directory
HISTORY_DIR="${HOME}/.claude-code-model-history"
mkdir -p "$HISTORY_DIR"
# Session-specific history file
HISTORY_FILE="${HISTORY_DIR}/${session_id}.history"
# Initialize history file if doesn't exist
if [ ! -f "$HISTORY_FILE" ]; then
echo "${current_model}" > "$HISTORY_FILE"
echo "0" >> "$HISTORY_FILE" # Switch count
fi
# Read previous model and switch count
previous_model=$(sed -n '1p' "$HISTORY_FILE")
switch_count=$(sed -n '2p' "$HISTORY_FILE")
# Detect model switch
if [ "$current_model" != "$previous_model" ] && [ "$previous_model" != "" ]; then
# Model changed - increment switch count
switch_count=$((switch_count + 1))
# Log switch event (append to history)
echo "$(date +%s)|${previous_model}→${current_model}" >> "$HISTORY_FILE"
fi
# Update current model and switch count (overwrite first 2 lines)
temp_file="${HISTORY_FILE}.tmp"
echo "${current_model}" > "$temp_file"
echo "${switch_count}" >> "$temp_file"
tail -n +3 "$HISTORY_FILE" >> "$temp_file" 2>/dev/null
mv "$temp_file" "$HISTORY_FILE"
# Determine model tier and color
case "$current_model" in
*"Opus"*|*"opus"*)
MODEL_COLOR="\033[38;5;201m" # Magenta: Opus (most expensive)
MODEL_ICON="💎"
MODEL_TIER="OPUS"
;;
*"Sonnet"*|*"sonnet"*)
MODEL_COLOR="\033[38;5;75m" # Blue: Sonnet (balanced)
MODEL_ICON="🎵"
MODEL_TIER="SONNET"
;;
*"Haiku"*|*"haiku"*)
MODEL_COLOR="\033[38;5;46m" # Green: Haiku (cheapest)
MODEL_ICON="🍃"
MODEL_TIER="HAIKU"
;;
*)
MODEL_COLOR="\033[38;5;250m" # Gray: Unknown
MODEL_ICON="❓"
MODEL_TIER="UNKNOWN"
;;
esac
# Switch frequency indicator
if [ $switch_count -eq 0 ]; then
SWITCH_STATUS="stable"
SWITCH_COLOR="\033[38;5;46m" # Green: No switches
elif [ $switch_count -le 3 ]; then
SWITCH_STATUS="${switch_count} switches"
SWITCH_COLOR="\033[38;5;226m" # Yellow: 1-3 switches
else
SWITCH_STATUS="${switch_count} switches!"
SWITCH_COLOR="\033[38;5;196m" # Red: 4+ switches (frequent switching)
fi
# Get last 3 switches for mini-history
last_switches=$(tail -n 3 "$HISTORY_FILE" | grep '→' | cut -d'|' -f2 | tr '\n' ' ' | sed 's/ $//')
if [ -n "$last_switches" ]; then
HISTORY_DISPLAY="| ${last_switches}"
else
HISTORY_DISPLAY=""
fi
RESET="\033[0m"
# Output statusline
echo -e "${MODEL_ICON} ${MODEL_COLOR}${MODEL_TIER}${RESET} | ${SWITCH_COLOR}${SWITCH_STATUS}${RESET} ${HISTORY_DISPLAY}"{
"statusLine": {
"type": "command",
"command": "$CLAUDE_PROJECT_DIR/.claude/statuslines/model-switch-history-tracker.sh",
"refreshInterval": 1000
}
}{
"statusLine": {
"type": "command",
"command": "$CLAUDE_PROJECT_DIR/.claude/statuslines/model-switch-history-tracker.sh",
"refreshInterval": 1000
}
}
Extended version tracking cost impact of model switches
#!/usr/bin/env bash
# Enhanced Model Switch History Tracker with Cost Tracking
input=$(cat)
current_model=$(echo "$input" | jq -r '.model.display_name // .model.id // "unknown"')
session_id=$(echo "$input" | jq -r '.session_id // "unknown"')
total_cost=$(echo "$input" | jq -r '.cost.total_cost_usd // 0')
HISTORY_DIR="${HOME}/.claude-code-model-history"
mkdir -p "$HISTORY_DIR"
HISTORY_FILE="${HISTORY_DIR}/${session_id}.history"
COST_FILE="${HISTORY_DIR}/${session_id}.cost"
if [ ! -f "$HISTORY_FILE" ]; then
echo "${current_model}" > "$HISTORY_FILE"
echo "0" >> "$HISTORY_FILE"
fi
previous_model=$(sed -n '1p' "$HISTORY_FILE" 2>/dev/null || echo "")
switch_count=$(sed -n '2p' "$HISTORY_FILE" 2>/dev/null || echo "0")
if [ "$current_model" != "$previous_model" ] && [ -n "$previous_model" ] && [ "$previous_model" != "unknown" ]; then
switch_count=$((switch_count + 1))
echo "$(date +%s)|${previous_model}→${current_model}" >> "$HISTORY_FILE"
# Track cost at switch point
echo "$(date +%s)|${total_cost}" >> "$COST_FILE"
fi
temp_file="${HISTORY_FILE}.tmp"
echo "${current_model}" > "$temp_file"
echo "${switch_count}" >> "$temp_file"
tail -n +3 "$HISTORY_FILE" >> "$temp_file" 2>/dev/null
mv "$temp_file" "$HISTORY_FILE"
case "$current_model" in
*"Opus"*|*"opus"*)
MODEL_COLOR="\033[38;5;201m"
MODEL_ICON="💎"
MODEL_TIER="OPUS"
;;
*"Sonnet"*|*"sonnet"*)
MODEL_COLOR="\033[38;5;75m"
MODEL_ICON="🎵"
MODEL_TIER="SONNET"
;;
*"Haiku"*|*"haiku"*)
MODEL_COLOR="\033[38;5;46m"
MODEL_ICON="🍃"
MODEL_TIER="HAIKU"
;;
*)
MODEL_COLOR="\033[38;5;250m"
MODEL_ICON="❓"
MODEL_TIER="UNKNOWN"
;;
esac
if [ $switch_count -eq 0 ]; then
SWITCH_STATUS="stable"
SWITCH_COLOR="\033[38;5;46m"
elif [ $switch_count -le 3 ]; then
SWITCH_STATUS="${switch_count} switches"
SWITCH_COLOR="\033[38;5;226m"
else
SWITCH_STATUS="${switch_count} switches!"
SWITCH_COLOR="\033[38;5;196m"
fi
last_switches=$(tail -n 3 "$HISTORY_FILE" 2>/dev/null | grep '→' | cut -d'|' -f2 | tr '\n' ' ' | sed 's/ $//')
if [ -n "$last_switches" ]; then
HISTORY_DISPLAY="| ${last_switches}"
else
HISTORY_DISPLAY=""
fi
# Format cost
cost_formatted=$(printf "$%.2f" $total_cost 2>/dev/null || echo "$${total_cost}")
RESET="\033[0m"
echo -e "${MODEL_ICON} ${MODEL_COLOR}${MODEL_TIER}${RESET} | ${SWITCH_COLOR}${SWITCH_STATUS}${RESET} | $${cost_formatted} ${HISTORY_DISPLAY}"
Version with enhanced model name matching for all Claude variants
#!/usr/bin/env bash
# Model Switch History Tracker with Extended Model Detection
input=$(cat)
current_model=$(echo "$input" | jq -r '.model.display_name // .model.id // "unknown"')
session_id=$(echo "$input" | jq -r '.session_id // "unknown"')
HISTORY_DIR="${HOME}/.claude-code-model-history"
mkdir -p "$HISTORY_DIR"
HISTORY_FILE="${HISTORY_DIR}/${session_id}.history"
if [ ! -f "$HISTORY_FILE" ]; then
echo "${current_model}" > "$HISTORY_FILE"
echo "0" >> "$HISTORY_FILE"
fi
previous_model=$(sed -n '1p' "$HISTORY_FILE" 2>/dev/null || echo "")
switch_count=$(sed -n '2p' "$HISTORY_FILE" 2>/dev/null || echo "0")
if [ "$current_model" != "$previous_model" ] && [ -n "$previous_model" ] && [ "$previous_model" != "unknown" ]; then
switch_count=$((switch_count + 1))
echo "$(date +%s)|${previous_model}→${current_model}" >> "$HISTORY_FILE"
fi
temp_file="${HISTORY_FILE}.tmp"
echo "${current_model}" > "$temp_file"
echo "${switch_count}" >> "$temp_file"
tail -n +3 "$HISTORY_FILE" >> "$temp_file" 2>/dev/null
mv "$temp_file" "$HISTORY_FILE"
# Extended model detection (handles claude-3-5-sonnet, claude-opus-4-1, etc.)
case "$current_model" in
*"Opus"*|*"opus"*|*"claude-opus"*|*"claude-4"*)
MODEL_COLOR="\033[38;5;201m"
MODEL_ICON="💎"
MODEL_TIER="OPUS"
;;
*"Sonnet"*|*"sonnet"*|*"claude-3-5"*|*"claude-3-7"*)
MODEL_COLOR="\033[38;5;75m"
MODEL_ICON="🎵"
MODEL_TIER="SONNET"
;;
*"Haiku"*|*"haiku"*|*"claude-3-haiku"*)
MODEL_COLOR="\033[38;5;46m"
MODEL_ICON="🍃"
MODEL_TIER="HAIKU"
;;
*)
MODEL_COLOR="\033[38;5;250m"
MODEL_ICON="❓"
MODEL_TIER="UNKNOWN"
;;
esac
if [ $switch_count -eq 0 ]; then
SWITCH_STATUS="stable"
SWITCH_COLOR="\033[38;5;46m"
elif [ $switch_count -le 3 ]; then
SWITCH_STATUS="${switch_count} switches"
SWITCH_COLOR="\033[38;5;226m"
else
SWITCH_STATUS="${switch_count} switches!"
SWITCH_COLOR="\033[38;5;196m"
fi
last_switches=$(tail -n 3 "$HISTORY_FILE" 2>/dev/null | grep '→' | cut -d'|' -f2 | tr '\n' ' ' | sed 's/ $//')
if [ -n "$last_switches" ]; then
HISTORY_DISPLAY="| ${last_switches}"
else
HISTORY_DISPLAY=""
fi
RESET="\033[0m"
echo -e "${MODEL_ICON} ${MODEL_COLOR}${MODEL_TIER}${RESET} | ${SWITCH_COLOR}${SWITCH_STATUS}${RESET} ${HISTORY_DISPLAY}"
Complete setup script with history directory creation and Unicode character testing
#!/bin/bash
# Installation script for Model Switch History Tracker
# Check for jq (required for JSON parsing)
if ! command -v jq &> /dev/null; then
echo "Installing jq for JSON parsing..."
if [[ "$OSTYPE" == "darwin"* ]]; then
brew install jq
elif [[ "$OSTYPE" == "linux-gnu"* ]]; then
sudo apt-get install -y jq || sudo yum install -y jq
else
echo "Please install jq manually: https://jqlang.github.io/jq/"
fi
fi
# Create history directory
mkdir -p ~/.claude-code-model-history
echo "Model history directory created: ~/.claude-code-model-history"
# Test Unicode characters
if echo -e '💎 🎵 🍃 ❓ →' &> /dev/null; then
echo "Unicode characters supported"
else
echo "Warning: Unicode characters may not be supported in your terminal"
echo "Arrow character (→) may display as '->' or box"
fi
# Test date command (required for timestamps)
if date +%s &> /dev/null; then
echo "Date command working: $(date +%s)"
else
echo "Warning: date command may not support +%s format"
fi
mkdir -p .claude/statuslines
cat > .claude/statuslines/model-switch-history-tracker.sh << 'SCRIPT_EOF'
#!/usr/bin/env bash
# Model Switch History Tracker for Claude Code
# Tracks transitions between Claude models (Opus, Sonnet, Haiku)
read -r input
current_model=$(echo "$input" | jq -r '.model.display_name // .model.id // "unknown"')
session_id=$(echo "$input" | jq -r '.session_id // "unknown"')
HISTORY_DIR="${HOME}/.claude-code-model-history"
mkdir -p "$HISTORY_DIR"
HISTORY_FILE="${HISTORY_DIR}/${session_id}.history"
if [ ! -f "$HISTORY_FILE" ]; then
echo "${current_model}" > "$HISTORY_FILE"
echo "0" >> "$HISTORY_FILE"
fi
previous_model=$(sed -n '1p' "$HISTORY_FILE" 2>/dev/null || echo "")
switch_count=$(sed -n '2p' "$HISTORY_FILE" 2>/dev/null || echo "0")
if [ "$current_model" != "$previous_model" ] && [ -n "$previous_model" ] && [ "$previous_model" != "unknown" ]; then
switch_count=$((switch_count + 1))
echo "$(date +%s)|${previous_model}→${current_model}" >> "$HISTORY_FILE"
fi
temp_file="${HISTORY_FILE}.tmp"
echo "${current_model}" > "$temp_file"
echo "${switch_count}" >> "$temp_file"
tail -n +3 "$HISTORY_FILE" >> "$temp_file" 2>/dev/null
mv "$temp_file" "$HISTORY_FILE"
case "$current_model" in
*"Opus"*|*"opus"*)
MODEL_COLOR="\033[38;5;201m"
MODEL_ICON="💎"
MODEL_TIER="OPUS"
;;
*"Sonnet"*|*"sonnet"*)
MODEL_COLOR="\033[38;5;75m"
MODEL_ICON="🎵"
MODEL_TIER="SONNET"
;;
*"Haiku"*|*"haiku"*)
MODEL_COLOR="\033[38;5;46m"
MODEL_ICON="🍃"
MODEL_TIER="HAIKU"
;;
*)
MODEL_COLOR="\033[38;5;250m"
MODEL_ICON="❓"
MODEL_TIER="UNKNOWN"
;;
esac
if [ $switch_count -eq 0 ]; then
SWITCH_STATUS="stable"
SWITCH_COLOR="\033[38;5;46m"
elif [ $switch_count -le 3 ]; then
SWITCH_STATUS="${switch_count} switches"
SWITCH_COLOR="\033[38;5;226m"
else
SWITCH_STATUS="${switch_count} switches!"
SWITCH_COLOR="\033[38;5;196m"
fi
last_switches=$(tail -n 3 "$HISTORY_FILE" 2>/dev/null | grep '→' | cut -d'|' -f2 | tr '\n' ' ' | sed 's/ $//')
if [ -n "$last_switches" ]; then
HISTORY_DISPLAY="| ${last_switches}"
else
HISTORY_DISPLAY=""
fi
RESET="\033[0m"
echo -e "${MODEL_ICON} ${MODEL_COLOR}${MODEL_TIER}${RESET} | ${SWITCH_COLOR}${SWITCH_STATUS}${RESET} ${HISTORY_DISPLAY}"
SCRIPT_EOF
chmod +x .claude/statuslines/model-switch-history-tracker.sh
# Add to settings.json
if [ ! -f .claude/settings.json ]; then
echo '{"statusLine":{"type":"command","command":"$CLAUDE_PROJECT_DIR/.claude/statuslines/model-switch-history-tracker.sh","refreshInterval":1000}}' > .claude/settings.json
else
jq '.statusLine = {"type":"command","command":"$CLAUDE_PROJECT_DIR/.claude/statuslines/model-switch-history-tracker.sh","refreshInterval":1000}' .claude/settings.json > .claude/settings.json.tmp
mv .claude/settings.json.tmp .claude/settings.json
fi
echo "Model Switch History Tracker installed successfully!"
echo "Note: History files stored in ~/.claude-code-model-history/"
echo "View history: cat ~/.claude-code-model-history/[session-id].history"
Check model.display_name field: echo '$input' | jq .model.display_name. Script matches case-insensitively on 'Opus', 'Sonnet', 'Haiku' keywords. If model name doesn't contain these (e.g., 'claude-3-5-sonnet-20241022'), add custom matching: 'claude-3-5-sonnet') MODEL_TIER='SONNET'. Verify field exists and has expected format. Check model.id as fallback: echo '$input' | jq .model.id.
Verify session_id is consistent: echo '$input' | jq .session_id. Each session has separate history file. If session_id changes, switch count resets (expected). Check history file exists: ls ~/.claude-code-model-history/${session_id}.history. Verify file format: first line = current model, second line = switch count. Manually test: echo 'Opus' > file.history && echo '0' >> file.history. Check model comparison logic: ensure previous_model is not empty.
Ensure HOME environment variable is set: echo $HOME. Check write permissions: mkdir -p ~/.claude-code-model-history. If permission denied, change location: HISTORY_DIR='/tmp/claude-model-history-$(whoami)'. Verify statusline script runs with correct user permissions. Check disk space: df -h ~. Verify directory creation: mkdir -p ~/.claude-code-model-history && touch ~/.claude-code-model-history/test && rm ~/.claude-code-model-history/test.
History format is 'timestamp|ModelA→ModelB' (e.g., '1730000000|Opus→Sonnet'). Check file content: tail ~/.claude-code-model-history/${session_id}.history. Grep filter looks for '→' character - ensure terminal encoding supports Unicode arrow. Alternative: replace → with ASCII '->' in script. Verify grep works: echo 'test→test' | grep '→'. Check cut command: echo '123|Opus→Sonnet' | cut -d'|' -f2 (should return 'Opus→Sonnet').
Switch count stored on line 2 of history file. Verify: sed -n '2p' ~/.claude-code-model-history/${session_id}.history. Count only increments when current_model != previous_model AND previous_model is not empty. New sessions start at 0 (expected). Manually reset: echo '0' to line 2 if corrupted. Check arithmetic: switch_count=$((switch_count + 1)). Verify sed reading: sed -n '2p' file.history (should return number).
Verify file format: first line = current model, second line = switch count, subsequent lines = switch events. Check file exists and is readable: ls -l ~/.claude-code-model-history/${session_id}.history. Verify sed commands work: sed -n '1p' file (first line), sed -n '2p' file (second line). Check temp file operations: ensure temp_file is created and moved atomically. If corrupted, delete history file to reset: rm ~/.claude-code-model-history/${session_id}.history.
Verify terminal encoding supports Unicode: locale charmap (should be UTF-8). Set terminal to UTF-8: export LANG=en_US.UTF-8. Test arrow: echo -e '→'. If not supported, modify script to use ASCII '->' instead. Check grep for arrow: echo 'test→test' | grep '→' (should match). Verify tr and sed handle Unicode: echo '→' | tr '→' '->'.
Script uses case-insensitive pattern matching on 'Opus', 'Sonnet', 'Haiku'. For new variants (e.g., 'claude-3-5-sonnet-20241022'), extend case statement: 'claude-3-5') MODEL_TIER='SONNET'. Check model name format: echo '$input' | jq .model.display_name. Add custom patterns for specific model IDs. Verify case statement syntax: case "$current_model" in pattern) commands ;; esac.
Show that Model Switch History Tracker - Statuslines is listed on HeyClaude. Paste this Markdown into your README — it renders the badge and links back to this page.
[](https://heyclau.de/entry/statuslines/model-switch-history-tracker)Model Switch History Tracker - Statuslines side by side with 3 alternatives on trust, install, platform support, and disclosed safety notes — all from reviewed registry metadata.
1 trust signal differ across this comparison (Submitter).
| Field | Claude Code statusline that detects model switches between Opus, Sonnet, and Haiku — shows current tier, total session switch count, and the last few model transitions inline. Open dossier | Multi-provider AI performance dashboard with context occupancy tracking, truncation warnings, TTFT latency, tokens/min rate, and model comparison metrics. Open dossier | Claude 5-hour conversation block tracker with visual countdown, expiration warnings, and color-coded indicators to prevent unexpected session terminations. Open dossier | Claude Code statusline that estimates context pressure from local session token counts and a configurable context limit, then prints a compact risk tier. Open dossier |
|---|---|---|---|---|
| Next steps | ||||
| Trust | ||||
| Review status | ReviewedMaintainer reviewed | ReviewedMaintainer reviewed | ReviewedMaintainer reviewed | ReviewedMaintainer reviewed |
| Package trust | Package not verified | Package not verified | Package not verified | Package not verified |
| Source provenance | Source-backed | Source-backed | Source-backed | Source-backed |
| SubmitterDiffers | — | — | — | MkDev11 |
| Install risk | Review first | Review first | Review first | Review first |
| Notes | Safety ✓ Privacy ✓ | Safety ✓ Privacy ✓ | Safety ✓ Privacy ✓ | Safety ✓ Privacy ✓ |
| Brand | — | — | — | — |
| Category | statuslines | statuslines | statuslines | statuslines |
| Source | source-backed | source-backed | source-backed | source-backed |
| Author | JSONbored | JSONbored | JSONbored | MkDev11 |
| Added | 2025-10-25 | 2025-10-23 | 2025-10-23 | 2026-06-04 |
| Platforms | Claude Code | Claude Code | Claude Code | Claude Code |
| Source repo | — | — | — | — |
| Safety notes | ✓Creates and writes to ~/.claude-code-model-history/ to persist model switch history across Claude Code invocations. Runs as a background statusline command on every Claude Code refresh (every 1000ms by default). | ✓Runs as a Claude Code statusline command on every refresh and depends on the local shell environment; a failure only affects status rendering, not your session. | ✓Runs as a Claude Code statusline command on every refresh and depends on the local shell environment; a failure only affects status rendering, not your session. | ✓Context percentage is only as accurate as the configured limit and the usage fields available in the statusline input. Use the warning as a cue to summarize or checkpoint work before context pressure affects reasoning quality. Do not treat a low percentage as proof that all relevant files, instructions, or tool results are still in scope. |
| Privacy notes | ✓Reads the Claude Code statusline JSON from stdin (model, workspace path, token usage) and renders it in the local terminal; it does not send data off-machine. | ✓Reads the Claude Code statusline JSON from stdin (model, token usage, context occupancy) and renders it in the local terminal; it does not send data off-machine. | ✓Reads the Claude Code statusline JSON from stdin (model, workspace path, token usage) and renders it in the local terminal; it does not send data off-machine. | ✓The script reads local session counters and does not inspect prompt text, files, or transcript contents. Token counts and configured limits can still reveal workload size in screenshots or shared terminal logs. Teams should avoid placing customer names or project identifiers in shell variables that appear in debugging output. |
| Prerequisites |
|
|
|
|
| Install | — | — | — | — |
| Config | | | | |
| Citations | ||||
| Claim | Unclaimed | Unclaimed | Unclaimed | Unclaimed |
Source-backed guides for putting this to work.
Loading live community signals…
A short, calm digest of reviewed Claude resources. Unsubscribe any time.