If you spend your day pair-programming with terminal and IDE coding agents on a Mac, hitting a 5-hour session cap in the middle of a multi-file refactor hurts. Subscription quotas for Claude Code (Pro and Max), OpenAI Codex CLI, and Google Antigravity do not reset at midnight: each tool runs rolling 5-hour and 7-day windows.

Many developers hesitate to install third-party usage trackers because they do not want to paste browser session cookies, OAuth tokens, or API keys into another app. Fortunately, on macOS, these coding tools already expose their rate-limit windows and token logs locally on disk.

Here is where those numbers live on your Mac, why raw token sums look 10x larger than real spend if you count cache reads wrong, and four ways to keep your quotas and API-equivalent spend visible while you work.

1. Where Claude Code stores token logs and plan percentages

Claude Code writes two distinct kinds of usage data on macOS.

Local JSONL transcripts (~/.claude/projects/)

Every session writes a JSON Lines file under:

~/.claude/projects/<project-slug>/<session-id>.jsonl 

Each assistant turn includes a message.usage object with four counters:

  • input_tokens
  • output_tokens
  • cache_creation_input_tokens
  • cache_read_input_tokens

If you sum all four fields across an afternoon of coding, you will routinely see 20M to 50M+ tokens and wonder how you did not burn through your entire plan in twenty minutes. Roughly 85% to 92% of that raw total is cache_read_input_tokens: Claude re-reading the cached conversation prefix on every tool call.

When estimating actual new work or API-equivalent USD spend from local logs, separate new tokens (input_tokens + output_tokens + cache_creation_input_tokens) from cache reads. Watching your cache ratio also reveals when a bloated session or parallel subagent fan-out is rebuilding fresh caches too often.

Exact Pro and Max plan percentages (statusLine in ~/.claude/settings.json)

Transcript logs alone cannot give your exact Anthropic Pro or Max quota percentage because server-side weights vary by model and tier. However, Claude Code in the terminal pipes a JSON payload on stdin to any statusLine command configured in ~/.claude/settings.json.

On Pro and Max accounts, that JSON includes rate_limits:

{ "rate_limits": { "five_hour": { "used_percentage": 42.5, "resets_at": 1762819200 }, "seven_day": { "used_percentage": 31.0, "resets_at": 1763164800 } } } 

You can snapshot those numbers atomically without breaking your existing terminal status bar (ccstatusline, Starship, or a custom script) by chaining a tiny POSIX shell tap in ~/.claude/settings.json:

#!/bin/sh input=$(cat) case "$input" in *'"rate_limits"'*) file="$HOME/.claude/latest-rate-limits.json" printf '%s\n' "$input" > "$file.tmp.$$" && mv -f "$file.tmp.$$" "$file" ;; esac # Forward stdin unchanged to your original status line script: if [ -x "$HOME/.claude/my-statusline.sh" ]; then printf '%s' "$input" | "$HOME/.claude/my-statusline.sh" fi 

Now any local macOS tool can read ~/.claude/latest-rate-limits.json with zero network requests and zero credentials. (For a deeper walkthrough of rolling windows and reset math, see How Claude Code Rate Limits Work.)

2. Where OpenAI Codex CLI writes its 5-hour and weekly limits

OpenAI's Codex CLI writes session logs under:

~/.codex/sessions/YYYY/MM/DD/*.jsonl 

After turns, Codex emits event_msg lines where payload.type is "token_count". Inside payload.rate_limits, OpenAI records both windows directly:

  • primary: used_percent, window_minutes (300 for the 5-hour window), and resets_at (Unix epoch seconds).
  • secondary: used_percent, window_minutes (10080 for the 7-day window), and resets_at.

Because both resets_at and window_minutes are present, you can compute a pace mark:

elapsed_fraction = 1 - (resets_at - now) / (window_minutes * 60) 

Comparing used_percent against elapsed_fraction tells you far more than a raw number: 55% of your weekly quota on Saturday afternoon is comfortable, whereas 55% on Tuesday morning means you will hit a lockout by Thursday.

3. Four ways to watch these limits and costs on macOS

  1. Built-in /usage commands: Zero setup and 100% official, though you only see them when you stop coding, switch to the active terminal tab, and run /usage.
  2. CLI log analyzers (npx ccusage): Great open-source terminal report for checking daily and monthly API-equivalent dollar spend in ~/.claude/projects, though it runs on demand in a shell rather than displaying live 5-hour reset countdowns or Codex/Antigravity quotas on screen (detailed comparison: Live Mac Dock vs CLI Usage Trackers (ccusage Alternative)).
  3. macOS menu bar trackers: Convenient on a wide external monitor, though on 14-inch and 16-inch MacBook Pros and notched MacBook Airs, macOS silently hides rightmost menu bar items behind the camera housing whenever Xcode, Cursor, or Chrome menus expand.
  4. Live tiles in the Dock row or side bezel: Even on a laptop screen, the empty strip beside (or inside) the macOS Dock has no camera notch and stays in peripheral vision while you switch between editor and terminal.

4. Putting live quotas and a 13-week spend dashboard in the Mac Dock

After losing menu bar meters behind the MacBook notch one too many times, I built Dockspace for Mac (getdock.space, by JBer), a native Swift and AppKit Liquid Glass widget bar that sits in the macOS Dock's place, in the empty space beside Apple's Dock, or vertically on the left or right screen bezel.

For AI coding workflows (v1.1.13), it uses the exact local files above with no login and no API key:

  • Non-destructive statusLine chaining: Connects ~/.claude/settings.json in one click while keeping your existing terminal status line intact.
  • Hover 13-week activity and API-value dashboard: Hovering the Claude Usage, Codex Limits, or unified AI Limits tile opens AgentDetailView with 5-hour and 7-day pace marks, reset countdowns, API-equivalent USD spend, cache-read percentage, and a 91-day activity heatmap across Today, 7 Days, 30 Days, and 13 Weeks.
  • Multi-agent status board & side-dock alerts: Lists local Claude Code, Codex, Cursor, and Antigravity sessions as working, needs you, done, or idle (reading metadata only, never prompts or code). On a vertical side dock, the tile expands automatically when an agent needs your input and tucks back into a single column once you act.

Disclosure: I am JBer, the solo developer of Dockspace for Mac (getdock.space). Replacing the Dock and 10 core widgets (including CPU, Battery, Weather, a Notch Clipboard Shelf on ⌥⌘V, and Disk Doctor with 25x faster iCloud-safe cache scanning and a 2D Canvas Thanos snap cleanup to Trash) stay free forever with no account; the AI quota and agent board widgets are part of Pro.

Whichever setup you choose, separating cache_read_input_tokens from new tokens and pairing your 5-hour window with a weekly pace mark makes surprise mid-sprint lockouts much rarer.