Skip to content

Instantly share code, notes, and snippets.

@ezyang
Created April 16, 2026 12:44
Show Gist options
  • Select an option

  • Save ezyang/eed1b08b371558433e87a341bfaf887b to your computer and use it in GitHub Desktop.

Select an option

Save ezyang/eed1b08b371558433e87a341bfaf887b to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
# Claude Code status line - shows context window remaining percentage
input=$(cat)
remaining=$(echo "$input" | jq -r '.context_window.remaining_percentage // empty')
if [ -n "$remaining" ]; then
printf 'Context: %s%% remaining' "$remaining"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment