I recently built a tortoise-and-hare status line for Claude Code that shows whether you're burning tokens faster than a steady pace. That post is here.
Then Anthropic raised the 5h limit but tightened the weekly cap. Suddenly the 7-day limit became the one that actually bites — with the relaxed 5h window, hitting 100% in five hours takes real effort. The weekly cap doesn't.
So I updated the script: 7d gets the full-width tortoise/hare bar, 5h keeps the same logic in a shorter bar on the right:
[Sonnet 4.6] ········🐢···········🐇 7d:105% ⚠️@5/14 | ··🐢··🐇··· 5h:70% ⚠️@18:00
(The 7d:105% is real — that's what I'm seeing right now. Going over 100% means you're into Claude Code's additional usage allowance beyond the base weekly limit. The 🐇 flies off the right edge of the bar when that happens.)
#!/bin/bash
input=$(cat)
MODEL=$(echo "$input" | jq -r '.model.display_name')
FIVE_H_PCT=$(echo "$input" | jq -r '(.rate_limits.five_hour.used_percentage // 0)')
SEVEN_D_PCT=$(echo "$input" | jq -r '(.rate_limits.seven_day.used_percentage // 0)')
FIVE_H_RESETS=$(echo "$input" | jq -r '.rate_limits.five_hour.resets_at // empty')
SEVEN_D_RESETS=$(echo "$input" | jq -r '.rate_limits.seven_day.resets_at // empty')
NOW=$(date +%s)
TZ=Asia/Tokyo # change to your local timezone
W7=20; W5=10 # bar widths: 7d full, 5h half
make_bar() {
local actual=$1 ideal=$2 width=$3 bar="" i
for i in $(seq 0 $((width - 1))); do
if [ "$i" -eq "$ideal" ] && [ "$i" -eq "$actual" ]; then bar="${bar}🐢🐇"
elif [ "$i" -eq "$ideal" ]; then bar="${bar}🐢"
elif [ "$i" -eq "$actual" ]; then bar="${bar}🐇"
else bar="${bar}·"
fi
done
[ "$actual" -ge "$width" ] && bar="${bar}🐇"
echo "$bar"
}
# 7-day window (main bar, width=20)
if [ -n "$SEVEN_D_RESETS" ]; then
REMAINING_7D=$((SEVEN_D_RESETS - NOW))
RESET_7D_MD=$(date -r "$SEVEN_D_RESETS" "+%m/%d" | awk -F/ '{printf "%d/%d", $1, $2}')
RESET_7D_TAG="@${RESET_7D_MD}"
if [ "$REMAINING_7D" -gt 0 ] && [ "$REMAINING_7D" -lt 604800 ]; then
IDEAL_7D=$(( (604800 - REMAINING_7D) * W7 / 604800 ))
else
IDEAL_7D=0
fi
else
IDEAL_7D=0; RESET_7D_TAG="@?"
fi
ACTUAL_7D=$(awk "BEGIN {print int($SEVEN_D_PCT * $W7 / 100)}")
BAR_7D=$(make_bar "$ACTUAL_7D" "$IDEAL_7D" "$W7")
[ "$ACTUAL_7D" -gt "$IDEAL_7D" ] && WARN_7D=" ⚠️" || WARN_7D=""
SEVEN_D_DISP=$(printf "%.0f" "$SEVEN_D_PCT")
# 5-hour window (half bar, width=10)
if [ -n "$FIVE_H_RESETS" ]; then
REMAINING_5H=$((FIVE_H_RESETS - NOW))
RESET_5H_JST=$(date -r "$FIVE_H_RESETS" "+%H:%M")
RESET_5H_TAG="@${RESET_5H_JST}"
if [ "$REMAINING_5H" -gt 0 ] && [ "$REMAINING_5H" -lt 18000 ]; then
IDEAL_5H=$(( (18000 - REMAINING_5H) * W5 / 18000 ))
else
IDEAL_5H=0
fi
else
IDEAL_5H=0; RESET_5H_TAG="@?"
fi
ACTUAL_5H=$(awk "BEGIN {print int($FIVE_H_PCT * $W5 / 100)}")
BAR_5H=$(make_bar "$ACTUAL_5H" "$IDEAL_5H" "$W5")
[ "$ACTUAL_5H" -gt "$IDEAL_5H" ] && WARN_5H=" ⚠️" || WARN_5H=""
FIVE_H_DISP=$(printf "%.0f" "$FIVE_H_PCT")
echo "[${MODEL}] ${BAR_7D} 7d:${SEVEN_D_DISP}%${WARN_7D}${RESET_7D_TAG} | ${BAR_5H} 5h:${FIVE_H_DISP}%${WARN_5H}${RESET_5H_TAG}"
W7=20 and W5=10 control bar widths. 18000 = 5 hours in seconds, 604800 = 7 days. Change TZ=Asia/Tokyo at the top to your local timezone.
United States
NORTH AMERICA
Related News
Trump Calls Off AI Executive Order Over Concern It Could Weaken US Tech Edge
4h ago

Microservices Didn't Fail. People Did
4h ago

Meta Settles Lawsuit That Claimed Social Media Addiction Screwed Up Schools
4h ago

Centralized Authentication for a Multi-Brand Laravel Ecosystem
12h ago
Gizmo Guard - Safeguard Bot (Powered by Gemma4)
4h ago