# Track Claude Code and Codex usage limits

> Track Claude Code and Codex usage limits and spend with Edith's Usage extension: a menu bar readout, limit alerts, and spend by day, model and project.

- Canonical URL: https://getedith.pro/docs/tutorials/track-agent-usage-limits
- Updated: 2026-12-03

When you finish, Edith shows how much of your Claude Code and Codex rate limits you have used, right in the menu bar, warns you before you run out, and tells you what your agents cost by day, model and project. You need Edith installed and at least one agent, such as Claude Code or Codex, signed in on this Mac. The guides on [Claude Code usage limits](https://getedith.pro/guides/check-claude-code-usage-limits) and [Codex usage limits](https://getedith.pro/guides/check-codex-usage-limits) explain the limits themselves.

## Install Usage

[Usage](https://getedith.pro/docs/extensions/claude-code-usage) reads the history your agents keep on this Mac. It never reads your prompts or code, and nothing is uploaded.

Usage is a starter tool in the Developer profile, so it may already be in your sidebar. If not, open **Library**, find **Usage** under **Agents & Terminal**, and press **Install**. From the terminal, `ed extensions install usage` does the same.

## Collect your history

Open **Usage** in the sidebar. The first time, press **Collect usage now**. After that, the refresh button at the top of the page (**Collect new usage and limits now**) collects again. The first run can take a few minutes on a Mac with a long agent history.

The page then shows your totals, an activity heatmap and a **Rate limits** card.

![The Agent usage page with range buttons from Today to All time, model, folder and agent filters, total tokens and cost cards, an activity heatmap and a Rate limits card with the five-hour session at 62 percent and the week at 41 percent, each with its reset countdown](shot:ext-usage)

## Read your limits

Usage polls each provider in the background. For Claude it uses the login Claude Code already saved on this Mac, read from the Keychain without a prompt. Most Claude and Codex plans have a 5-hour window and a weekly window, and which ones apply depends on your plan. Claude can also have a separate weekly Fable window.

Once the first reading lands, the **Rate limits** card fills in with each window, how much is used and when it resets. Press the refresh button on the card (**Check your rate limits now**) to poll right away.

To choose which providers Usage checks, press the **Settings** button at the top right of the Usage page and use **Claude limits**, **Codex limits** and the other provider switches under **Limits**.

> **Note:** If Claude limits do not appear, turn on **Show limits in Claude Code** in Usage settings. Edith then also reads your limits from Claude Code's status line, and keeps any status line command you already had.

## Put the readout in the menu bar

Limit percentages show in the menu bar by default. In Usage settings, under **Limits**:

1. Keep **Show limits in the menu bar** on.
2. Open **Customize menu bar**.
3. Pick the windows under **Menu bar shows for Claude** and **Menu bar shows for Codex**.
4. Choose a **Menu bar style**: **Stacked**, **Tagged** or **Slashes**.

Set **Menu bar color** to **Custom** to pick your own colors and where a limit turns amber and red.

## Turn on limit alerts

Alerts are off until you turn them on.

1. In Usage settings, find **Alerts** and turn on **Enable alerts**.
2. Pick the alerts you want: **On pace to hit the cap**, **Almost capped** (90% by default), **Capped**, **Back after a reset** and more.
3. Press **Send test notification** to check that alerts reach you. If nothing arrives, allow notifications for Edith in **Settings > Permissions**.

## Check your spend

Pick a range, model, folder or agent at the top of the Usage page to see where tokens and money go. The page breaks the totals down by model and by project.

## From the terminal

The same readings are available as `ed usage` commands. You do not need to open Edith first:

```terminal
$ ed usage limits
PROVIDER  LIMIT                USED   RESETS  OBSERVED
Claude    5-hour limit         42.0%  2h 29m  2026-08-08T16:39:58Z
Claude    Weekly · all models  18.0%  4d 20h  2026-08-08T16:39:58Z
$ ed usage summary --range week
cost    $42.10
tokens  61204550
days    7
```

- `ed usage limits` prints the last saved reading. Add `--refresh` to poll first; it waits up to 20 seconds.
- `ed usage refresh` collects your history, and `ed usage alerts` shows what each window would alert about right now, and why.
- `ed usage models` and `ed usage projects` break totals down by model and by GitHub repository.
- Menu bar and alert settings are config keys, such as `menuBarLimitsStyle`, `warnPercent` and `notifyMaster`. Set them with `ed config set`.

Every report prints JSON with `--json`. This prints the Claude 5-hour window's percentage, so a script can hold back new work when it is nearly full:

```terminal
$ ed usage limits --json | jq -r '.[] | select(.provider == "claude") | .session.percent'
```

`ed usage limits` exits 4 with `no limit history yet` until Edith has saved a first reading. See [Automate Edith from scripts](https://getedith.pro/docs/tutorials/automate-edith-from-scripts) for handling exit codes.

## Next steps

- [`ed usage` reference](https://getedith.pro/docs/cli/usage), including [`limits`](https://getedith.pro/docs/cli/usage/limits) and [`alerts`](https://getedith.pro/docs/cli/usage/alerts).
- [Machines](https://getedith.pro/docs/machines): collect usage from agents on your servers with `ed usage machines`.
- [Connect Claude Code over MCP](https://getedith.pro/docs/tutorials/connect-claude-code-over-mcp) so the agent can read its own limits.
- [Run coding agents overnight](https://getedith.pro/use-cases/run-coding-agents-overnight).

## Get Edith

Edith is a native Mac app for macOS 14 or later on Apple silicon with 100+ extensions, the `ed` command line and an MCP server. $35 once for one Mac, plus $7 for each additional Mac, with no subscription and a 30-day refund.

- [Buy Edith](https://getedith.pro/pricing): $35 once for one Mac, plus $7 for each additional Mac
- [Download Edith](https://getedith.pro/download): the installer, or Homebrew
