A laptop displays an AI coding assistant completing a data-pipeline refactor beside Python usage and allowance charts.
Claude Code's usage limits tend to bite at the worst moment, usually halfway through a refactor. XDA Developers writer Anurag Singh says he got tired of that and wrote a small local dashboard to warn him ahead of time. The project is a Python tool called Usage Window. It doesn't change what Claude Code is allowed to do. It makes the limits visible and gives a rough estimate of how long the current pace can last. This piece covers what the tool does, why its approach works, and where its limits are.

A laptop displays an AI coding assistant completing a data-pipeline refactor beside Python usage and allowance charts. What the author built​

Singh says Usage Window hooks into Claude Code's existing status-line interface. Running python3 usage_window.py --install configures Claude Code to pass its usage data to the script. The script logs each observation to a local SQLite database. These details come from the author. We haven't seen the code or tested the tool independently.

The dashboard runs in a separate terminal pane next to Claude Code and has several views:

  • Main screen: two gauges, one for the five-hour window and one for the weekly window. They show usage, what remains and when each window resets. The screen also shows current context usage and a timeline of active windows.
  • Estimated time to limit: the author's favorite feature. It projects how long you can keep working by looking at how fast you've burned allowance recently. It needs enough recent data, so it sometimes shows nothing.
  • History: usage over the last hour, 24 hours or seven days, with graphs and individual observations.
  • Sessions: the last activity, model and context usage for each Claude Code session.
  • Slash command: a /usage-window command gives a quick snapshot without opening the dashboard.

Singh also says the tool needs no API key or extra Python packages, makes no network requests and doesn't collect conversations. It flags readings more than five minutes old as stale. The privacy claims are the author's statements, not audited properties. Anyone installing a script that edits their Claude Code configuration should read the source first, as with any such tool.

Why a status-line script can do this​

The idea has solid backing in Anthropic's own documentation. The Claude Code status-line docs say that for subscribers, the rate_limits object can contain a rolling five_hour window and a weekly seven_day window. Each window has a used percentage and a reset time. Third-party guides say the same. One notes that Claude Code only sends rate_limits to Pro and Max subscribers, and only after the session's first response.

So Usage Window doesn't scrape anything. It reads data Claude Code already hands to status-line scripts and adds persistence and trend analysis. The same source says each window may be independently absent, and Claude Code drops a window once its resets_at time passes. A dashboard built this way has to cope with missing data, which may be why the author's tool sometimes shows no estimate.

Why a simple percentage isn't enough​

The author's main point is that "60% used" doesn't tell you how much work is left, because tasks burn allowance at very different rates. A quick feature can take a handful of prompts. A bug hunt can involve repeated file reads, commands and edits. Anthropic's help center backs up the structure behind this. It says Pro and Max plans have a five-hour session limit and a weekly limit, and verified Ultra accounts don't have a five-hour session limit.

The two limits also interact. One guide notes that every request counts against both windows, so a single heavy burst can use up the weekly allowance before the five-hour window even resets. That is the scenario the author describes, with plenty of room in the five-hour window but the weekly cap close.

A pace-based estimate fits this problem. It is still only a projection from recent behavior. A pause, a switch to a different model, or a sudden burst of subagent activity will make it wrong.

How it compares with built-in options​

Claude Code already offers several ways to check usage:

  • /usage: a point-in-time check. One guide says on Pro, Max, Team and Enterprise plans it shows how much of the five-hour and weekly windows you've used, when each one resets, and what used your allowance.
  • Warnings: Claude Code can tell you when most of a limit is gone. One example from a guide is "You've used 85% of your session limit · resets 3:45pm."
  • A custom status line: a simple script can show both windows all the time.
  • Community tools: a directory of status lines and mods says it lists 41 status lines and 9 mods, so this need is widely shared. Some of them already include pace-based warnings.

Usage Window's differences are persistent history, a time-to-limit forecast and a separate dashboard pane. For some people a simple status-line percentage will be enough.

What happens at the wall​

Anthropic's support page describes a safety net. If you hit the five-hour limit mid-response, Claude Code may finish the step in progress, and on Pro that can happen up to once per weekly usage period. On Max it can apply each time you reach a 5-hour limit. Anthropic says this rollout is gradual and the allowance is small. It also counts toward your weekly limit. It doesn't cover new messages sent after you reach the limit.

The wrap-up allowance is a backstop, not a plan. It only helps with a response already in progress. A dashboard that shows you're heading for the limit lets you decide earlier, as the author does, to finish a task instead of starting something big.

Caveats for Windows users​

Claude Code runs on Windows. Anthropic's setup docs list Windows 10 1809+ or Windows Server 2019+, with a native install or WSL. The docs say Shell: Bash, Zsh, PowerShell, or CMD are supported. On native Windows, Git for Windows is optional but gives Claude Code a Bash tool.

The source doesn't say which operating system the author uses. It also gives no Windows instructions for Usage Window. A few practical points:

  • Python command: python3 is the command the author reports. It may not exist under that name in every Windows shell. Check your own environment before assuming the install command works unchanged.
  • WSL: if you run Claude Code inside WSL, the Linux-style command is more likely to apply. That is our inference, not something the source tested.
  • Subscription type: the rate-limit data goes to subscribers. A November 4 update on one tips site says verified Ultra accounts have no five-hour window, and on a verified account there is no 5-hour window and the whole object can be missing. People using pay-per-token API keys have no such windows at all.
  • Interface: the research found user reports on Anthropic's GitHub issue tracker that status lines don't render in the Claude Code desktop app. They are community reports, not official documentation. The approach is terminal-oriented.
  • Stale data: the author's five-hour staleness warning is a sensible design. A forecast built on old readings is worse than none.

On the word "mod"​

The headline calls this a mod, but the article describes a standalone Python program wired in through the status line, plus a slash command. The author separately discusses hooks, plugins and mods as other customization routes. He says mods can change Claude Code's behavior and interface, and that Anthropic already uses them for features like /diff. We couldn't verify those broader claims, so treat them as the author's reporting. Anthropic's own materials do confirm hooks. They automatically trigger actions at specific points, such as running your test suite after code changes, according to Anthropic's announcement of the Claude Code 2.0 upgrades.

Bottom line​

  • Usage Window is one developer's local, pace-based tracker. Its design relies on a documented Claude Code feature, the status-line rate_limits data.
  • It makes limits visible and helps you decide when to wrap up. It doesn't raise your allowance or prevent a cutoff.
  • The estimates are projections that depend on recent usage and enough recent data.
  • Windows users should confirm their shell, Python setup and plan type before trying it. Compatibility on Windows is unverified.
  • Because it edits your Claude Code configuration, review any such script's code before installing it. The privacy claims come from the author and haven't been independently checked.

The wider point is that Claude Code's status-line data is open to anyone who wants to build on it. If a simple always-on percentage doesn't tell you enough, a small script like this is a reasonable way to get more.

 

References

  1. I wrote my own Claude Code mod to show my usage window, and I stopped getting cut off mid-task XDA 2026-11-17T13:01:22+00:00
  2. Use Claude Code with your Pro, Max, or Ultra plan | Claude Help Center support.anthropic.com
  3. Enabling Claude Code to work more autonomously \ Anthropic anthropic.com