<?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: cybersgk</title>
    <description>The latest articles on DEV Community by cybersgk (@cybersgk).</description>
    <link>https://dev.to/cybersgk</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%2F4272335%2F850b8011-e92b-4b49-a5af-a78085195f4e.png</url>
      <title>DEV Community: cybersgk</title>
      <link>https://dev.to/cybersgk</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/cybersgk"/>
    <language>en</language>
    <item>
      <title>Running a 2-day job through Claude Code's usage limits</title>
      <dc:creator>cybersgk</dc:creator>
      <pubDate>Sun, 29 Nov 2026 13:27:48 +0000</pubDate>
      <link>https://dev.to/cybersgk/running-a-2-day-job-through-claude-codes-usage-limits-3jj1</link>
      <guid>https://dev.to/cybersgk/running-a-2-day-job-through-claude-codes-usage-limits-3jj1</guid>
      <description>&lt;p&gt;If you run genuinely long jobs in Claude Code, the kind that run overnight or across a couple of days, you eventually hit the same wall: the usage limit. The session taps out partway through and sits there waiting for you to come back and restart it.&lt;/p&gt;

&lt;p&gt;I got tired of babysitting a multi-day render, so I wrote a small skill called Marathon that carries a task across as many usage windows as it needs.&lt;/p&gt;

&lt;h2&gt;
  
  
  How it works
&lt;/h2&gt;

&lt;p&gt;Marathon is a behaviour protocol the model follows, plus one tiny shell script. The loop goes:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Do a chunk of the task.&lt;/li&gt;
&lt;li&gt;Watch usage at checkpoints, and poll more often as you get close to the limit.&lt;/li&gt;
&lt;li&gt;Right before you'd hit the wall, kick off a background timer that sleeps until the window resets, and stop working.&lt;/li&gt;
&lt;li&gt;When the timer exits, the session wakes back up with full context, checks that the window really reset, and carries on.&lt;/li&gt;
&lt;li&gt;Repeat, for as many windows as the job takes, including the weekly limit, not just the 5-hour one.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Why it costs nothing
&lt;/h2&gt;

&lt;p&gt;Here's the part that makes it work: sleeping is free. The usage limit counts model inference, the tokens you actually process, not wall-clock time. So a session that's just sitting there asleep burns nothing against your quota. Wait out the reset and the work simply picks up on the next window.&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;# the whole waiter, essentially:&lt;/span&gt;
&lt;span class="nv"&gt;reset_epoch&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nv"&gt;$(&lt;/span&gt;date -j -u -f &lt;span class="s2"&gt;"%Y-%m-%dT%H:%M:%S"&lt;/span&gt; &lt;span class="s2"&gt;"${reset_iso%.*}"&lt;/span&gt; +%s&lt;span class="o"&gt;)&lt;/span&gt;
&lt;span class="nv"&gt;secs&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nv"&gt;$(&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt; reset_epoch - &lt;span class="nv"&gt;$(&lt;/span&gt;date -u +%s&lt;span class="o"&gt;)&lt;/span&gt; + 300 &lt;span class="o"&gt;)&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;
sleep &lt;span class="s2"&gt;"$secs"&lt;/span&gt;
&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"window reset, resume"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Get it
&lt;/h2&gt;

&lt;p&gt;It's opt-in (you say "marathon this: "), MIT, no telemetry, two small files.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/cybersgk/claude-marathon-skill" rel="noopener noreferrer"&gt;https://github.com/cybersgk/claude-marathon-skill&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git clone https://github.com/cybersgk/claude-marathon-skill.git
cp -R claude-marathon-skill/skills/marathon ~/.claude/skills/marathon
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then tell Claude: &lt;code&gt;marathon this: &amp;lt;your long task&amp;gt;&lt;/code&gt;.&lt;/p&gt;

</description>
      <category>claude</category>
      <category>ai</category>
      <category>productivity</category>
      <category>opensource</category>
    </item>
  </channel>
</rss>
