<?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: Davi Castro</title>
    <description>The latest articles on DEV Community by Davi Castro (@davicjc).</description>
    <link>https://dev.to/davicjc</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%2F4241915%2F7780a62f-d7f7-493d-af7f-ef14758f0fda.jpg</url>
      <title>DEV Community: Davi Castro</title>
      <link>https://dev.to/davicjc</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/davicjc"/>
    <language>en</language>
    <item>
      <title>I kept running out of Claude Code quota mid-task, so I put the limits on my Linux panel</title>
      <dc:creator>Davi Castro</dc:creator>
      <pubDate>Thu, 12 Nov 2026 23:37:36 +0000</pubDate>
      <link>https://dev.to/davicjc/i-kept-running-out-of-claude-code-quota-mid-task-so-i-put-the-limits-on-my-linux-panel-1472</link>
      <guid>https://dev.to/davicjc/i-kept-running-out-of-claude-code-quota-mid-task-so-i-put-the-limits-on-my-linux-panel-1472</guid>
      <description>&lt;p&gt;I use Claude Code, Antigravity (Gemini) and Copilot most of the day, and the way I usually found out I had hit a limit was a task stopping halfway through. Each tool shows its usage somewhere (&lt;code&gt;/usage&lt;/code&gt; in Claude Code, a settings page elsewhere), but I never look until it's too late.&lt;/p&gt;

&lt;p&gt;So I made &lt;strong&gt;CotaBar&lt;/strong&gt;, a small applet for the Cinnamon panel on Linux Mint. Each tool gets a double ring: the outer one is the long window (week or month), the inner one the short window (5 hours). Next to it are the two percentages with a letter for the period (H, D, W, M). Clicking it lists every limit with a bar and when it resets.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fhmrn48sclp04mdbwp7pg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fhmrn48sclp04mdbwp7pg.png" alt="CotaBar on the panel with the menu open" width="465" height="636"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  How it gets the numbers
&lt;/h2&gt;

&lt;p&gt;A Python script, standard library only, runs every few minutes. It reads the login each tool already keeps on disk and asks the same usage endpoint the tool itself uses:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Claude Code: &lt;code&gt;~/.claude/.credentials.json&lt;/code&gt;, the endpoint behind &lt;code&gt;/usage&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Antigravity: the &lt;code&gt;agy&lt;/code&gt; CLI token, Cloud Code's quota summary&lt;/li&gt;
&lt;li&gt;Codex: &lt;code&gt;~/.codex/auth.json&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Copilot: &lt;code&gt;gh auth token&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Two rules I didn't want to break:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Never refresh a token.&lt;/strong&gt; Refreshing Claude's or Codex's token rotates it, which would log out the session I have open. If a token is expired, CotaBar keeps the last good reading. With an expired token the tool is idle, so usage can't have gone up; it only zeroes the windows whose reset time already passed.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Never write a token.&lt;/strong&gt; The applet only reads a JSON with percentages and reset times.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A small thing I found along the way: Antigravity's quota endpoint returns only one model group unless the User-Agent carries the client version. With the version it returns Gemini, Claude/GPT and Argon separately.&lt;/p&gt;

&lt;h2&gt;
  
  
  Install
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git clone https://github.com/Davicjc/cotabar.git
&lt;span class="nb"&gt;cd&lt;/span&gt; cotabar &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; ./instalar.sh
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It shows up on the panel without restarting Cinnamon. The menu also has an update button that pulls the latest version from GitHub.&lt;/p&gt;

&lt;p&gt;Codex support follows the official endpoint, but I couldn't test it with a real account yet. If you use Codex, I'd love to know whether it works. The idea came from &lt;a href="https://github.com/vinzdg/codenotch" rel="noopener noreferrer"&gt;Codenotch&lt;/a&gt;, a macOS app that puts these limits on a notch; CotaBar is a separate implementation for the Linux panel.&lt;/p&gt;

&lt;p&gt;Repo: &lt;a href="https://github.com/Davicjc/cotabar" rel="noopener noreferrer"&gt;https://github.com/Davicjc/cotabar&lt;/a&gt;&lt;/p&gt;

</description>
      <category>linux</category>
      <category>opensource</category>
      <category>ai</category>
      <category>python</category>
    </item>
  </channel>
</rss>
