Skip to content
gentic.news — AI News Intelligence Platform
Connecting to the Living Graph…

Listen to today's AI briefing

Daily podcast — 5 min, AI-narrated summary of top stories

Developer's IDE status bar displaying real-time telemetry data including context window usage percentage and…
Open SourceScore: 80

cc-context-telemetry: Show Context Window & Rate-Limit % Directly in

Install cc-context-telemetry to monitor Claude Code's context window, Pro/Max rate-limits, and model via a custom statusLine segment.

·2d ago·4 min read··18 views·AI-Generated·Report error
Share:
Source: github.comvia hn_claude_code, gn_claude_code_tips, devto_mcpWidely Reported
How do I show context window and rate-limit usage in Claude Code's status bar?

cc-context-telemetry adds a real-time segment to Claude Code's status bar showing context window %, 5-hour and 7-day rate-limit usage with countdowns, and current model. Install via `npm i -g cc-context-telemetry` and set it as your statusLine in `~/.claude/settings.json`.

TL;DR

Install this open-source tool to see context usage, rate-limit resets, and model name right in your Claude Code status line.

What Changed — Real-Time Telemetry in Your Status Bar

Context Window Optimizing Strategies in Gen AI Applications | by ...

Claude Code's status bar is a small but powerful UI element. It shows your current branch and directory, but it hides critical info: how much of your context window is used, how many requests you have left under Pro or Max rate limits, and which model is active.

cc-context-telemetry changes that. It prepends a segment to your existing status line that looks like this:

ctx 48% | 5h 14% ~3h20m | 7d 50% ~4d | opus-4.8 ~/code/myapp main

Each piece tells you something actionable:

  • ctx 48% — Your context window is half full. Time to start a fresh session if you're hitting token limits.
  • 5h 14% ~3h20m — You've used 14% of your 5-hour rate limit, with ~3 hours 20 minutes until reset.
  • 7d 50% ~4d — You've used 50% of your 7-day rate limit, with ~4 days until reset.
  • opus-4.8 — The current model (short token).

This tool works with any existing status line setup, including popular plugins like adtention (which shows Git info, time, and more). It doesn't replace your current bar — it extends it.

What It Means For You — Stop Guessing, Start Optimizing

If you use Claude Code heavily, you've likely hit a context window limit mid-task or wondered why your requests suddenly slowed down. That's the rate-limit kick in.

With cc-context-telemetry, you can:

  • See context pressure in real time — If ctx is >70%, consider starting a new session or using /compact to free tokens.
  • Plan around rate-limit resets — The countdowns tell you exactly when you'll get more capacity. No more refreshing the Anthropic dashboard.
  • Know which model is active — If you switch models mid-session (e.g., via /model), the bar updates immediately. No confusion.

This is especially valuable for teams sharing a Pro or Max plan. If you see 5h 80%, you know to throttle down or switch to a cheaper model until the reset.

Try It Now — Setup in 2 Minutes

1. Install

npm i -g cc-context-telemetry

No Node.js on your machine? Skip npm. Git clone the repo and use the absolute path to bin/cct-statusline as your command below.

2. Configure

Add this to ~/.claude/settings.json:

{
  "statusLine": {
    "type": "command",
    "command": "cc-context-telemetry-statusline"
  }
}

Restart Claude Code. You'll see the telemetry segment.

3. Wrap an Existing Status Line

Already using a custom status line? Set CCT_WRAP:

{
  "statusLine": {
    "type": "command",
    "command": "cc-context-telemetry-statusline",
    "env": {
      "CCT_WRAP": "<your existing statusline command>"
    }
  }
}

If your Claude Code version doesn't support env in settings, export CCT_WRAP in your shell profile instead.

4. Customize Segments

Use CCT_SEGMENTS to pick which data shows and in what order. Options:

  • ctx — Context window %
  • 5h — 5-hour rate-limit % with countdown
  • 7d — 7-day rate-limit % with countdown
  • model — Current model short token

Example — show only rate limits:

{
  "statusLine": {
    "type": "command",
    "command": "cc-context-telemetry-statusline",
    "env": {
      "CCT_SEGMENTS": "5h,7d"
    }
  }
}

Or reorder to put model first:

{
  "statusLine": {
    "type": "command",
    "command": "cc-context-telemetry-statusline",
    "env": {
      "CCT_SEGMENTS": "model,ctx,5h,7d"
    }
  }
}

Changes take effect only in a new session.

5. Host-Owned Status Lines

If another tool (like a plugin) manages your status line, you can point that tool at cct instead. See examples/host-owned-statusline.md in the repo for details.

Forward Signal

As Claude Code expands to larger projects with multi-agent workflows (via Claude Agent), real-time telemetry like this becomes essential for orchestration. Imagine an agent that auto-compacts your session when context hits 80%, or routes tasks to a different model when rate limits are tight. This tool is a first step toward that future — and it's free, open-source, and ready today.


Source: github.com

Source: gentic.news · · author= · citation.json

AI-assisted reporting. Generated by gentic.news from multiple verified sources, fact-checked against the Living Graph of 4,300+ entities. Edited by Ala SMITH.

Following this story?

Get a weekly digest with AI predictions, trends, and analysis — free.

AI Analysis

Claude Code users should immediately install cc-context-telemetry to gain visibility into two critical bottlenecks: context window pressure and rate-limit exhaustion. Without it, you're flying blind — hitting limits mid-task with no warning. The tool's `CCT_SEGMENTS` env variable lets you tailor the bar to your workflow: if you only care about rate limits (e.g., heavy Pro users), drop `ctx` and `model` to reduce visual noise. Second, use the countdown data to plan your sessions. If `5h` shows 80% used with 30 minutes until reset, consider switching to a cheaper model like Sonnet for non-critical tasks. If `ctx` is >70%, run `/compact` or start a fresh session. This turns the status bar from a passive display into an active decision-support tool. Finally, if you maintain a custom status line already, use `CCT_WRAP` to chain them rather than replacing your setup. The tool is designed to be additive, not destructive. For teams, standardize on a segment order (e.g., `ctx,5h,7d,model`) in a shared settings template to ensure everyone has the same visibility.
Compare side-by-side
Claude Code vs cc-context-telemetry
Enjoyed this article?
Share:

AI Toolslive

Five one-click lenses on this article. Cached for 24h.

Pick a tool above to generate an instant lens on this article.

Related Articles

From the lab

The framework underneath this story

Every article on this site sits on top of one engine and one framework — both built by the lab.

More in Open Source

View all