claude-code icon indicating copy to clipboard operation
claude-code copied to clipboard

[Bug] Auto-continue disabled after five_hour rate limit reset with multiple sessions

Open ymdvsymd opened this issue 2 months ago • 4 comments

Bug Description

Summary

With /config → "Continue automatically at usage limit" enabled, a CLI session stopped at a five_hour usage limit and never retried after the reset time. The process stayed alive the whole time; the session only resumed when I typed into it manually the next morning, ~8.5 hours later.

Environment

  • Claude Code 2.1.261
  • macOS (Apple Silicon)
  • entrypoint: cli, launched as: exec caffeinate -dims claude --enable-auto-mode
  • Model: claude-opus-5

Timeline (JST)

Time Event
00:45:06 Session A (e8d777e2) hits limit, HTTP 429
00:49:10 Session B (991e4133, sessionKind: bg) hits same limit
01:20 resetsAt (1788625200)
01:20–09:41 No records at all in either session JSONL
09:41:12 / 09:41:24 Both resumed — by me typing into the still-running sessions

Gap: 536 min / 532 min with zero records, spanning the reset.

Rate limit payload

{
  "status": "rejected",
  "resetsAt": 1788625200,
  "unifiedRateLimitFallbackAvailable": false,
  "rateLimitType": "five_hour",
  "overageStatus": "rejected",
  "overageDisabledReason": "member_zero_credit_limit",
  "isUsingOverage": false
}

Ruled out

  • Sleep: none. pmset -g log shows powerd's "Prevent sleep while display is on" assertion (same id 0x10000944f) held continuously across the window; no Sleep/Wake/DarkWake events.
  • Crash: ~/Library/Logs/DiagnosticReports/ has no entries for the window.
  • Network: kernel TCP + mDNSResponder logs show the Claude process connecting every ~20s throughout.
  • Process death: the CLI process was alive — I typed into the same running session the next morning and it continued.

Expected

After resetsAt, the interrupted turn is re-sent automatically.

Actual

Nothing happens. The session sits idle indefinitely until manual input.

Possibly relevant

Two sessions shared the same five-hour window, one of them sessionKind: bg. Both failed to auto-resume.

Environment Info

  • Platform: darwin
  • Terminal: Orca
  • Version: 2.1.261
  • Feedback ID: da04df96-5a70-4032-b3dc-1b8ad537cbbf

Errors

[]

ymdvsymd avatar Sep 06 '26 02:09 ymdvsymd

I am having the same problem. Limit was reached just 30 minutes before reset.

bancsdan avatar Sep 08 '26 17:09 bancsdan

Hit a variant of this with the CLI entrypoint specifically (not the desktop app): Continue automatically at usage limit enabled, the process stays alive, and nothing re-sends the turn once resetsAt passes — it just sits idle until someone types into it. Your JSONL gap (536/532 min, zero records, spanning the reset, one session sessionKind: bg) matches what I've run into: the internal resume path seems to depend on a signal that doesn't reliably fire for a CLI session sitting past reset with nobody attached, rather than a background timer that would just retry regardless of who's watching.

Since the built-in setting can silently miss this, for plain CLI sessions I stopped depending on it and wrapped claude in a small script instead: it runs claude as a child process, reads its own stdout, recognizes the usage-limit message in the text itself, waits for the reset, and relaunches with --continue — no internal event needed, it's just reacting to what the terminal already shows. Open-sourced it here in case it helps as a stopgap while the underlying arming bug gets fixed: https://github.com/blackstardigitalstudio/claude-auto-continue (MIT, the CLI wrapper works on macOS/Linux/WSL/Git Bash, no telemetry).

Doesn't explain why the internal arming misses this case — just a way to keep unattended CLI runs going in the meantime.

blackstardigitalstudio avatar Sep 26 '26 11:09 blackstardigitalstudio

Same symptom in the Claude desktop app (Code tab), not only the CLI.

Environment: Claude desktop 2.42304.0, Claude Code 2.1.302, macOS 26.7.1 (Apple Silicon). One local Code-tab session in bypass-permissions mode, plus several cloud sessions and headless claude -p processes on the same account at the same time.

Setting: the desktop preference autoResumeRateLimitOptIn is true for the signed-in account (checked in claude_desktop_config.json).

What happens: auto-resume worked once, after the first five-hour limit. After that, the session never resumes on its own. Each time it waits idle past the reset until I type into it.

Evidence from ~/Library/Logs/Claude/main.log: the local session logged the limit 4 times over 2 days, each with a reset time, for example:

[warn] [CCD CycleHealth] local_… api_error (success): You've hit your session limit · resets 7:10pm (America/Sao_Paulo)

After the reset times, the log has no auto-resume or retry line for that session. The only auto-resume line in the logs is an unrelated Relaunch auto-resume from a month earlier. It looks as if the desktop app never schedules the retry after the first one, which matches "disabled after reset with multiple sessions".

fernando-s97 avatar Oct 18 '26 19:10 fernando-s97

any workaround for this? it is really annoying. I have this issue in claude desktop (mac) latest version and one before that. 2 versions prior - had no problems (or didn't get into that loop)

mpisat avatar Oct 25 '26 02:10 mpisat