Codeman logocodeman GitHub →

Auto-continue Claude Code when your usage limit resets

Updated 2026-09-25

On this pageWhat the built-in wait doesWhy it did not continueKeep the session alive until the resetSchedule the continue yourselfHow Codeman handles it

Claude Code v2.1.234 and later already do this: when a claude.ai usage limit stops a task in an interactive session, Claude Code waits in the open session and continues the task after the limit resets. If yours sat there instead, one of a few conditions applies: an older CLI, the setting switched off, a reset more than 24 hours away, a computer that slept through the reset, or a session that was closed.

What the built-in wait does

According to Anthropic's interactive mode docs, automatic continue is on by default in interactive sessions signed in with a claude.ai subscription. While it waits, the bottom of the session shows a line like:

Usage limit reached · continuing automatically at 3:45pm · esc to cancel

At the reset, Claude Code sends Claude a fixed prompt to pick the task up where it stopped (it does not resend your last message). Two behaviours are worth knowing before you rely on it overnight:

Why it did not continue

Situation What Claude Code does What to do
CLI older than v2.1.234 No built-in wait Update, or schedule the continue yourself (below)
Setting turned off Opens the usage-limit options menu instead Turn on Continue automatically at usage limit in /config
Reset more than 24 hours away (a weekly limit) Does not start the wait on its own Pick Wait here, then continue automatically from the menu or /rate-limit-options
Computer slept more than about 30 minutes across the reset Shows Your usage limit has reset · press enter to continue Press Enter, or run the session on a machine that does not sleep
You exited Claude Code during the wait The wait does not restart when you resume Keep the session open
You pressed Esc at an empty prompt, or Ctrl+C Cancels the wait for that reset window Run /rate-limit-options to start it again
claude -p runs, background sessions Not offered Rerun the job after the reset
API key or cloud provider billing No reset to wait for, usage is metered Not applicable

One detail about the setting: /config autoContinueAtUsageLimit=false turns it off, but the key=value form cannot turn it back on, because the setting grants unattended execution. Use the /config panel.

Keep the session alive until the reset

The wait lives inside the running session: closing the session ends it, and sleeping through the reset turns it into a press-Enter prompt. Running Claude Code inside tmux on a machine that stays on removes both problems:

tmux new -s work        # start a named session, then run claude inside it
# detach with Ctrl-b d; the session and its wait keep running
tmux attach -t work     # come back later, from any SSH connection

The details, including what survives a reboot and what does not, are in Keep Claude Code running when your laptop sleeps.

Schedule the continue yourself

On a CLI without the built-in wait, or with it switched off, the limit message names the reset time. Formats seen across Claude Code versions include:

5-hour limit reached ∙ resets 8pm
Weekly limit reached ∙ resets 6pm
You've hit your limit · resets 1:40pm (America/New_York)
You've hit your weekly limit · resets Mon 12:00am

If the session runs in tmux, a small script can wait until two minutes after that time and continue for you:

#!/usr/bin/env bash
# continue-at.sh <tmux-target> <reset time> [IANA zone]
# Example: continue-at.sh work "8pm"   or   continue-at.sh work "1:40pm" America/New_York
# Needs GNU date (on macOS: brew install coreutils, then use gdate).
set -eu
target=$1 when=$2 zone=${3:-}
slack=120                                   # wait two minutes past the reset

spec=$when
[ -n "$zone" ] && spec="TZ=\"$zone\" $when"
at=$(date -d "$spec" +%s)
now=$(date +%s)
[ "$at" -le "$now" ] && at=$((at + 86400))  # a bare time already past means tomorrow

echo "continuing at $(date -d "@$((at + slack))")"
sleep $((at - now + slack))

tmux send-keys -t "$target" Escape          # close the limit menu if it is open
sleep 1
tmux send-keys -t "$target" -l 'continue'
sleep 0.1
tmux send-keys -t "$target" Enter

Run it in a second tmux window or with nohup, so it survives your SSH connection:

nohup ./continue-at.sh work "1:40pm" America/New_York >/dev/null 2>&1 &

Why the Escape first: with automatic continue off, Claude Code opens its usage-limit options menu when you hit the limit, and Esc closes a dialog. Without it, the word continue would land in the menu.

Do not combine this with the built-in wait. Esc at an empty prompt cancels a pending automatic continue, and Esc during a turn interrupts Claude. Use one mechanism per session.

The two minutes of slack give the provider's clock and yours some room. If the limit has not actually lifted, Claude prints the limit message again and you can rerun the script with the new time.

How Codeman handles it

Codeman runs each agent CLI in a persistent tmux session on a machine you control, so the sleep and closed-terminal cases in the table above do not come up: the session keeps running whether or not a browser is attached.

It also has its own per-session switch, Auto-resume when the usage limit resets, at the top of the Respawn tab in Session Options. It is off by default and works with Claude sessions only. When it is on:

The same switch is available over the API as POST /api/sessions/:id/auto-resume with {"enabled": true}. If your Claude Code already has the built-in wait, that wait covers the same ground as this switch.

Because the continued turn can still stop on a permission prompt, pair either mechanism with a notification that reaches your phone. Codeman's web push and Approvals Inbox can deliver the question with Approve and Deny buttons; see Notifications And Approvals and, for overnight setups in general, Keeping Agents Running.