<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Packvuz</title>
    <description>The latest articles on DEV Community by Packvuz (@packvuz).</description>
    <link>https://dev.to/packvuz</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4238844%2F116a38a7-e9f4-4dc5-96fd-5d195b3781c0.jpg</url>
      <title>DEV Community: Packvuz</title>
      <link>https://dev.to/packvuz</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/packvuz"/>
    <language>en</language>
    <item>
      <title>How to monitor Claude Code, Codex, and Antigravity quotas on macOS without pasting an API key</title>
      <dc:creator>Packvuz</dc:creator>
      <pubDate>Wed, 11 Nov 2026 10:27:58 +0000</pubDate>
      <link>https://dev.to/packvuz/how-to-monitor-claude-code-codex-and-antigravity-quotas-on-macos-without-pasting-an-api-key-45a9</link>
      <guid>https://dev.to/packvuz/how-to-monitor-claude-code-codex-and-antigravity-quotas-on-macos-without-pasting-an-api-key-45a9</guid>
      <description>&lt;p&gt;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 &lt;strong&gt;Claude Code&lt;/strong&gt; (Pro and Max), &lt;strong&gt;OpenAI Codex CLI&lt;/strong&gt;, and &lt;strong&gt;Google Antigravity&lt;/strong&gt; do not reset at midnight: each tool runs rolling 5-hour and 7-day windows.&lt;/p&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Where Claude Code stores token logs and plan percentages
&lt;/h2&gt;

&lt;p&gt;Claude Code writes two distinct kinds of usage data on macOS.&lt;/p&gt;

&lt;h3&gt;
  
  
  Local JSONL transcripts (&lt;code&gt;~/.claude/projects/&lt;/code&gt;)
&lt;/h3&gt;

&lt;p&gt;Every session writes a JSON Lines file under:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;~/.claude/projects/&amp;lt;project-slug&amp;gt;/&amp;lt;session-id&amp;gt;.jsonl
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Each assistant turn includes a &lt;code&gt;message.usage&lt;/code&gt; object with four counters:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;input_tokens&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;output_tokens&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;cache_creation_input_tokens&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;cache_read_input_tokens&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;

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

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

&lt;h3&gt;
  
  
  Exact Pro and Max plan percentages (&lt;code&gt;statusLine&lt;/code&gt; in &lt;code&gt;~/.claude/settings.json&lt;/code&gt;)
&lt;/h3&gt;

&lt;p&gt;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 &lt;code&gt;stdin&lt;/code&gt; to any &lt;code&gt;statusLine&lt;/code&gt; command configured in &lt;code&gt;~/.claude/settings.json&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;On Pro and Max accounts, that JSON includes &lt;code&gt;rate_limits&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;"rate_limits"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;"five_hour"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="nl"&gt;"used_percentage"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mf"&gt;42.5&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="nl"&gt;"resets_at"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;1762819200&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="nl"&gt;"seven_day"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="nl"&gt;"used_percentage"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mf"&gt;31.0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="nl"&gt;"resets_at"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;1763164800&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



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

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;#!/bin/sh&lt;/span&gt;
&lt;span class="nv"&gt;input&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nv"&gt;$(&lt;/span&gt;cat&lt;span class="o"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;case&lt;/span&gt; &lt;span class="s2"&gt;"$input"&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt;
  *&lt;span class="s1"&gt;'"rate_limits"'&lt;/span&gt;*&lt;span class="o"&gt;)&lt;/span&gt;
    &lt;span class="nv"&gt;file&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"$HOME/.claude/latest-rate-limits.json"&lt;/span&gt;
    &lt;span class="nb"&gt;printf&lt;/span&gt; &lt;span class="s1"&gt;'%s\n'&lt;/span&gt; &lt;span class="s2"&gt;"$input"&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="s2"&gt;"$file.tmp.$$"&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; mv -f &lt;span class="s2"&gt;"$file.tmp.$$"&lt;/span&gt; &lt;span class="s2"&gt;"$file"&lt;/span&gt; &lt;span class="o"&gt;;&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;esac&lt;/span&gt;
&lt;span class="c"&gt;# Forward stdin unchanged to your original status line script:&lt;/span&gt;
&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="o"&gt;[&lt;/span&gt; -x &lt;span class="s2"&gt;"$HOME/.claude/my-statusline.sh"&lt;/span&gt; &lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt; &lt;span class="k"&gt;then&lt;/span&gt;
  &lt;span class="nb"&gt;printf&lt;/span&gt; &lt;span class="s1"&gt;'%s'&lt;/span&gt; &lt;span class="s2"&gt;"$input"&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="s2"&gt;"$HOME/.claude/my-statusline.sh"&lt;/span&gt;
&lt;span class="k"&gt;fi&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now any local macOS tool can read &lt;code&gt;~/.claude/latest-rate-limits.json&lt;/code&gt; with zero network requests and zero credentials. (For a deeper walkthrough of rolling windows and reset math, see &lt;a href="https://getdock.space/how-claude-code-limits-work" rel="noopener noreferrer"&gt;How Claude Code Rate Limits Work&lt;/a&gt;.)&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Where OpenAI Codex CLI writes its 5-hour and weekly limits
&lt;/h2&gt;

&lt;p&gt;OpenAI's Codex CLI writes session logs under:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;~/.codex/sessions/YYYY/MM/DD/*.jsonl
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;After turns, Codex emits &lt;code&gt;event_msg&lt;/code&gt; lines where &lt;code&gt;payload.type&lt;/code&gt; is &lt;code&gt;"token_count"&lt;/code&gt;. Inside &lt;code&gt;payload.rate_limits&lt;/code&gt;, OpenAI records both windows directly:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;primary&lt;/code&gt;: &lt;code&gt;used_percent&lt;/code&gt;, &lt;code&gt;window_minutes&lt;/code&gt; (&lt;code&gt;300&lt;/code&gt; for the 5-hour window), and &lt;code&gt;resets_at&lt;/code&gt; (Unix epoch seconds).&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;secondary&lt;/code&gt;: &lt;code&gt;used_percent&lt;/code&gt;, &lt;code&gt;window_minutes&lt;/code&gt; (&lt;code&gt;10080&lt;/code&gt; for the 7-day window), and &lt;code&gt;resets_at&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Because both &lt;code&gt;resets_at&lt;/code&gt; and &lt;code&gt;window_minutes&lt;/code&gt; are present, you can compute a &lt;strong&gt;pace mark&lt;/strong&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;elapsed_fraction = 1 - (resets_at - now) / (window_minutes * 60)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Comparing &lt;code&gt;used_percent&lt;/code&gt; against &lt;code&gt;elapsed_fraction&lt;/code&gt; 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.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Four ways to watch these limits and costs on macOS
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Built-in &lt;code&gt;/usage&lt;/code&gt; commands:&lt;/strong&gt; Zero setup and 100% official, though you only see them when you stop coding, switch to the active terminal tab, and run &lt;code&gt;/usage&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;CLI log analyzers (&lt;code&gt;npx ccusage&lt;/code&gt;):&lt;/strong&gt; Great open-source terminal report for checking daily and monthly API-equivalent dollar spend in &lt;code&gt;~/.claude/projects&lt;/code&gt;, though it runs on demand in a shell rather than displaying live 5-hour reset countdowns or Codex/Antigravity quotas on screen (detailed comparison: &lt;a href="https://getdock.space/ccusage-alternative" rel="noopener noreferrer"&gt;Live Mac Dock vs CLI Usage Trackers (&lt;code&gt;ccusage&lt;/code&gt; Alternative)&lt;/a&gt;).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;macOS menu bar trackers:&lt;/strong&gt; 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.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Live tiles in the Dock row or side bezel:&lt;/strong&gt; 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.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  4. Putting live quotas and a 13-week spend dashboard in the Mac Dock
&lt;/h2&gt;

&lt;p&gt;After losing menu bar meters behind the MacBook notch one too many times, I built &lt;strong&gt;Dockspace for Mac&lt;/strong&gt; (&lt;a href="https://getdock.space/claude-code-usage-limits" rel="noopener noreferrer"&gt;getdock.space&lt;/a&gt;, 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.&lt;/p&gt;

&lt;p&gt;For AI coding workflows (&lt;code&gt;v1.1.13&lt;/code&gt;), it uses the exact local files above with no login and no API key:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Non-destructive &lt;code&gt;statusLine&lt;/code&gt; chaining:&lt;/strong&gt; Connects &lt;code&gt;~/.claude/settings.json&lt;/code&gt; in one click while keeping your existing terminal status line intact.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Hover 13-week activity and API-value dashboard:&lt;/strong&gt; Hovering the Claude Usage, Codex Limits, or unified AI Limits tile opens &lt;code&gt;AgentDetailView&lt;/code&gt; 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.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Multi-agent status board &amp;amp; side-dock alerts:&lt;/strong&gt; Lists local Claude Code, Codex, Cursor, and Antigravity sessions as &lt;code&gt;working&lt;/code&gt;, &lt;code&gt;needs you&lt;/code&gt;, &lt;code&gt;done&lt;/code&gt;, or &lt;code&gt;idle&lt;/code&gt; (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.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;Disclosure: I am JBer, the solo developer of Dockspace for Mac (&lt;code&gt;getdock.space&lt;/code&gt;). Replacing the Dock and 10 core widgets (including CPU, Battery, Weather, a Notch Clipboard Shelf on &lt;code&gt;⌥⌘V&lt;/code&gt;, 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.&lt;/em&gt;&lt;/p&gt;

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

</description>
      <category>macos</category>
      <category>ai</category>
      <category>productivity</category>
      <category>tooling</category>
    </item>
  </channel>
</rss>
