ai newsDi., 1. Dez.

Running a 2-day job through Claude Code's usage limits

Claude Code learned to auto-continue after a usage limit resets, and it's a genuinely nice feature. But it stops after three resets in a row, and on the desktop app it only covers the 5-hour limit, not the weekly one. I had a job that ran longer than that, so I wrote a small skill to carry it the r

dev.toSonntag 14:27 · 29.11.2 Min. Lesezeit
Bild: dev.to

Posted on Nov 29 • Edited on Nov 29 • AI-assisted

Claude Code learned to auto-continue after a usage limit resets, and it's a genuinely nice feature. But it stops after three resets in a row, and on the desktop app it only covers the 5-hour limit, not the weekly one. I had a job that ran longer than that, so I wrote a small skill to carry it the rest of the way. Here's the problem, the mechanism, and the one thing that makes it cost nothing.

I was running a long batch task in the Claude desktop app, the kind that chews through a usage window and keeps going. Claude Code (v2.1.234+) will now wait at the limit and pick the task back up once it resets, which is great... until the third resume in a row, where it stops and asks you to step in. And the desktop "Auto-continue when limits reset" checkbox only covers the 5-hour session limit. The weekly card doesn't offer it at all.

For a task that spans five, eight, a dozen windows across a couple of days, that's still babysitting.

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. If you can get the session to pause and wait for the reset instead of grinding into the wall, the wait costs you nothing and the work just picks up on the next window.

Marathon is a skill (a behaviour protocol the model follows) plus one tiny shell script. The loop goes:

# the whole waiter, essentially: reset_epoch = $( date -j -u -f "%Y-%m-%dT%H:%M:%S" "${reset_iso%.*}" +%s ) secs = $( ( reset_epoch - $( date -u +%s ) + 300 ) ) sleep "$secs" echo "window reset, resume" Enter fullscreen mode Exit fullscreen mode When NOT to use it If your task fits inside about three resets, Claude Code's built-in auto-continue already has you covered, so use that. Marathon is for the multi-day runs that outlast the 3-continuation cap, or ones that are going to hit the weekly limit.

MIT, no telemetry, two small files: https://github.com/cybersgk/claude-marathon-skill

git clone https://github.com/cybersgk/claude-marathon-skill.git cp -R claude-marathon-skill/skills/marathon ~/.claude/skills/marathon Enter fullscreen mode Exit fullscreen mode Then tell Claude: marathon this: <your long task>.

Quelle: dev.to (dev.to). Original öffnen