<?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: Andrii Vasin</title>
    <description>The latest articles on DEV Community by Andrii Vasin (@avsi).</description>
    <link>https://dev.to/avsi</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.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3787403%2F5e3aaa33-d76b-4b32-8133-1c60a58e91fd.jpg</url>
      <title>DEV Community: Andrii Vasin</title>
      <link>https://dev.to/avsi</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/avsi"/>
    <language>en</language>
    <item>
      <title>How to make best of Claude Code's 5-Hour Limits</title>
      <dc:creator>Andrii Vasin</dc:creator>
      <pubDate>Mon, 23 Feb 2026 19:19:59 +0000</pubDate>
      <link>https://dev.to/avsi/how-to-make-best-of-claude-codes-5-hour-limits-4j32</link>
      <guid>https://dev.to/avsi/how-to-make-best-of-claude-codes-5-hour-limits-4j32</guid>
      <description>&lt;p&gt;If you actively use Claude Code, you've probably already run into its rate limit system, regardless of your subscription tier. In general, the limits consist of 5-hour and weekly windows.&lt;/p&gt;

&lt;h2&gt;
  
  
  How the Limits Work
&lt;/h2&gt;

&lt;p&gt;Claude Code applies limits using a &lt;strong&gt;sliding window&lt;/strong&gt; approach. The catch is that the window starts ticking from the moment of your very first request.&lt;/p&gt;

&lt;p&gt;For example, suppose you want to start work a bit later and do it all in one focused session without interruptions. If you burn through all your limits within the first hour, you'll have to wait another 4 hours for them to reset — not ideal.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Solution: "Warming Up" the Limits
&lt;/h2&gt;

&lt;p&gt;The logic is simple: if you send Claude a small message &lt;strong&gt;3–4 hours before you plan to start working&lt;/strong&gt;, the 5-hour limit window begins early and will reset right around the time you've been working for an hour or two.&lt;/p&gt;

&lt;p&gt;In other words, if I want to be productive from 09:00, I need to "knock on Claude's doors" at 06:00 — automatically, while I'm still asleep.&lt;/p&gt;

&lt;h2&gt;
  
  
  Implementation: Vercel Cron + OAuth
&lt;/h2&gt;

&lt;p&gt;I built a small open-source project — &lt;a href="https://github.com/tappress/claude-code-warmup" rel="noopener noreferrer"&gt;claude-code-warmup&lt;/a&gt;. Here's how it works:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Vercel Cron Job&lt;/strong&gt; runs on a schedule (e.g., every day at 04:00 UTC)&lt;/li&gt;
&lt;li&gt;The function grabs your OAuth token for Claude and sends it a short message.&lt;/li&gt;
&lt;li&gt;The 5-hour window starts ticking → resets after a few hours of your work.&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  About Tokens
&lt;/h3&gt;

&lt;p&gt;Under the hood, Claude Code uses standard OAuth 2.0. To obtain a one-year OAuth token, run:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;claude setup-token
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The value starts with &lt;code&gt;sk-ant-oat01-...&lt;/code&gt; — that's your token for configuration.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to Deploy in 2 Minutes
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. One-Click Deploy
&lt;/h3&gt;

&lt;p&gt;The simplest option — one click:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://vercel.com/new/clone?repository-url=https://github.com/tappress/claude-code-warmup" rel="noopener noreferrer"&gt;Deploy&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Then specify a Private Repository Name — what this repo will be called in your Git account.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Configure the Schedule
&lt;/h3&gt;

&lt;p&gt;In &lt;code&gt;vercel.json&lt;/code&gt;, change the &lt;code&gt;schedule&lt;/code&gt; to match your needs — how many hours before work you want the "warmup". The format is standard cron (UTC). Note that on the Vercel Hobby plan you can only specify the hour (not minutes), and if you set it to 6, the function will be invoked randomly between 6:00 and 7:00 — not exactly at 6:&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="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"crons"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"path"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"/api/warmup"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"schedule"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"0 6 * * *"&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;For building cron expressions, &lt;a href="https://crontab.guru/" rel="noopener noreferrer"&gt;crontab.guru&lt;/a&gt; is very handy.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  3. Add Environment Variables
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;CLAUDE_CODE_OAUTH_TOKEN&lt;/code&gt; — your OAuth token from the &lt;code&gt;claude setup-token&lt;/code&gt; command&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;CRON_SECRET&lt;/code&gt; — any random password (16+ characters recommended) to keep your cron function private&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;WARMUP_MESSAGE&lt;/code&gt; — &lt;em&gt;(optional)&lt;/em&gt; a custom warmup message&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;After adding the token and cron secret, don't forget to redeploy (any commit to the repo) so the variables take effect. After deployment, the cron job will run automatically on schedule (±59 min — a Hobby plan limitation).&lt;/p&gt;

&lt;h2&gt;
  
  
  Summary
&lt;/h2&gt;

&lt;p&gt;The 5-hour Claude Code limit problem is real, and it looks especially strange compared to Codex, which only has weekly limits. But it can be elegantly worked around by adding a simple "alarm clock" for a lazy Claude. The whole setup takes 2 minutes, and after that Claude Code is ready for serious work every day.&lt;/p&gt;

&lt;p&gt;Code here: &lt;a href="https://github.com/tappress/claude-code-warmup" rel="noopener noreferrer"&gt;github.com/tappress/claude-code-warmup&lt;/a&gt;&lt;/p&gt;

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