Claude Code + Codex ยท read-only

Did your limit run out on Wednesday? See what used it up.

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

Banner: what used up your limit, with a gauge needle almost in the red
In short

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.

Video

Who ate your limit, in two and a half minutes

Open on YouTube (Portuguese) โ†’ ยท 9:16

What it is

A gauge for your subscription

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.

Banner with six features: weekly gauge, top projects, routines, repeated tasks, calibrated limit, and everything local

โฑ๏ธ Weekly gauge

Green below 70% of the limit, yellow up to 90%, red above that. The status is always written out, not shown by color alone.

๐Ÿ“Š What uses the limit

Top 10 by project folder, session, and routine (agent tasks grouped by their first prompt).

๐Ÿ” What repeats

Agents running the same prompt on the same day, less than 1 hour apart: candidates to combine into one run.

How it works

Reads, adds up, and compares with your limit

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.

Claude Code and Codex logsโ†’ Totals by day, project, session, and routineโ†’ Weight by token typeโ†’ Weekly limit that was reachedโ†’ Gauge + top 10 + repeats

Processed tokens and weight

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.

You calibrate the limit

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.

Requirements

Python 3 and your session history

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.

Linux (Ubuntu, Debian)

Python 3 is already installed. If you need git:

sudo apt install -y git python3
python3 --version

Mac

The first command installs Apple's tools, which include git and Python 3.

xcode-select --install
python3 --version

Windows (WSL)

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.

Step-by-step guide

From zero to gauge in 5 minutes

The commands are the same on Linux, Mac, and Ubuntu on WSL.

1

Download the gauge

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
2

First reading: the last 7 days

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.

3

Find your limit in the week you hit it

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
4

Open the gauge

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.

5

Combine or pause repeats yourself

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
6

Share without exposing your projects

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
Real example

The INEMA machine over 7 days

Measured on 08/11/2026, with --anonimo. The complete files are in the repository's exemplos/ folder; the page is live here.

4.3 B

tokens processed in Claude Code over 7 days, 96% of them read from cache

81.9%

of the weekly limit used since Monday at 9 p.m.: yellow gauge

60%

of the weight over the 7 days came from a single project folder

699

agent runs repeated at the same time, in 91 groups

Gauge page: Claude Code at 81.9% and Codex with no limit set
The Claude Code gauge turned yellow. At the pace of the days when the machine was on, the week would end at 103% of the limit.
The same page on a mobile phone, with the gauge and bars
On mobile: the gauge, top 10 folders and routines, and the repeated task table, with no horizontal scrolling.
Honest limits

What the gauge cannot know

Know this before relying on the gauge.

Limit
It is your estimate, not an official numberIt comes from the week when the limit cut you off. If your usage changes a lot, calibrate again.
Other places
Websites, apps, and other computers do not appearThey use the same limit, but their logs are stored elsewhere.
Codex
The cutoff is almost never recordedYou usually have to enter the Codex limit manually (--teto).
Repeats
Similar prompts do not always mean duplicated workA batch of 40 summaries using the same template appears as one group. That is why the savings shown are "at least" the fixed cost of each extra run, and "up to" the total if the work is the same.