A green, yellow, or red gauge, the projects that use the most, and the agents that repeat the same work.

medidor-de-limite is a small program that reads the logs Claude Code and Codex already save on your computer and shows where your subscription limit went. It is for people who use these assistants heavily, especially with agents and scheduled tasks, and hit the weekly limit without knowing what used it. It points out the projects that use the most and the repeated tasks you could combine. You only need Python 3: it uses no internet or API key, and it does not delete or pause anything.
Your plan says you have a weekly limit, but not how many tokens it covers or what is using them. The gauge gets that from your own logs.
Green below 70% of the limit, yellow up to 90%, red above that. The status is always written out, not shown by color alone.
Top 10 by project folder, session, and routine (agent tasks grouped by their first prompt).
Agents running the same prompt on the same day, less than 1 hour apart: candidates to combine into one run.
Everything happens on your computer. Conversation contents never appear: only numbers and the beginning of each prompt, up to 80 characters, with no email, link, or folder path.
Almost everything that passes through the model is read from cache, which costs little. That is why the gauge uses weight: each token type counts in proportion to its public price (Claude: new 1, cache write 1.25, cache read 0.1, output 5). The report shows both numbers.
The plan does not publish its limit in tokens. When the limit cuts you off, Claude Code writes "You've hit your weekly limit" to the log. The calibrar command finds that message and adds up what you used that week: that is your limit. Usage on the website, in the app, or on another computer is not included.
Works wherever Claude Code or Codex already run and save logs (~/.claude/projects and ~/.codex/sessions). Choose your system and paste the commands one at a time.
Python 3 is already installed. If you need git:
sudo apt install -y git python3 python3 --version
The first command installs Apple's tools, which include git and Python 3.
xcode-select --install python3 --version
In PowerShell as an administrator, install Ubuntu and restart. Then, in Ubuntu:
wsl --install sudo apt install -y git python3
If Claude Code runs on Windows (outside WSL), point to its folder in step 2 with --claude-dir /mnt/c/Users/YOUR_USER/.claude/projects; Codex on Windows goes in with --codex-home /mnt/c/Users/YOUR_USER/.codex. Whatever runs on the Windows side and is not pointed to stays out of the count.
The commands are the same on Linux, Mac, and Ubuntu on WSL.
It is a folder with a Python file and the gauge page. It does not install anything on your system.
git clone https://github.com/inematds/medidor-de-limite.git cd medidor-de-limite
Shows totals for Claude Code and Codex, the top 10 projects, the top 10 routines, and repeated tasks. An 8 GB history takes less than half a minute because the tool reads line by line and skips anything that is not a count.
python3 medir.py relatorio
For a different time window, use --dias 14. If you have two Codex accounts, each in its own folder, the tool finds ~/.codex, ~/.codex-2, and $CODEX_HOME; add another folder with --codex-home.
Searches the last 35 days for the weekly limit message and adds up what you used that week. Check the number and save it.
python3 medir.py calibrar python3 medir.py calibrar --salvar
Did it find no cutoff? Enter when it happened, or set a number manually. The number is in the weight unit, the same one relatorio shows per tool: start from the weight of a week in which you came close to the limit.
python3 medir.py calibrar --estourou-em "2026-10-26 18:00" --salvar python3 medir.py calibrar --ferramenta codex --teto 60000000 --salvar
Creates a page with the animated gauge, bars by project and routine, a daily chart, and a table of repeated tasks. Works on mobile.
python3 medir.py html --saida medidor.html xdg-open medidor.html
On Mac, replace xdg-open with open. On WSL, use explorer.exe medidor.html.
The gauge only makes suggestions. Find the timer or scheduled task that starts the repeated routine and decide whether to combine it into one run.
systemctl --user list-timers crontab -l
With --anonimo, folders not on a list of public names become privado-1, privado-2โฆ and their prompts disappear. The list is a text file with one name per line.
python3 medir.py html --anonimo --publicos publicos.txt --saida medidor.html
Measured on 08/11/2026, with --anonimo. The complete files are in the repository's exemplos/ folder; the page is live here.
tokens processed in Claude Code over 7 days, 96% of them read from cache
of the weekly limit used since Monday at 9 p.m.: yellow gauge
of the weight over the 7 days came from a single project folder
agent runs repeated at the same time, in 91 groups


Know this before relying on the gauge.
--teto).