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

Auto-continue at usage limit does not trigger.

Open DanielMartinezSebastian opened this issue 1 month ago • 6 comments

Bug Description Auto-continue at usage limit does not trigger.

  • Claude Code 2.1.302 on Windows, claude.ai subscription.
  • /config shows "Continue automatically at usage limit: true"; toggling it off/on several times changes nothing. The key autoContinueAtUsageLimit is not present in the user's ~/.claude/settings.json after toggling.
  • When the 5h limit is hit, no "Continuing shortly · esc to cancel" line appears. Output shown: Called claude-in-chrome You've hit your session limit · resets 3:50am (Europe/Madrid) Use your limit reset to reset it now: clau.de/reset /upgrade or /usage-credits to finish what you're working on.
  • The session does not resume after the reset.

Environment Info

  • Platform: win32
  • Terminal: WezTerm
  • Version: 2.1.302
  • Feedback ID: 85056c1c-9f50-4d97-a1ac-e8f35269ec10

DanielMartinezSebastian avatar Oct 19 '26 22:10 DanielMartinezSebastian

A session that just sits on the limit message after the reset is exactly the situation where a workaround helps, so here is one in case it is useful while the built-in auto-continue isn't arming for you.

I maintain a small open-source wrapper called claude-ac. It watches the Claude Code CLI output for the usage-limit message, waits until the stated reset time, then retries with --continue. On Windows it runs from Git Bash or WSL: ./install.sh, then claude-ac "<prompt>" or claude-ac --continue (claude-ac --ac-help lists the options). It is MIT licensed, has no telemetry, and only re-runs your session: it never buys or upgrades anything.

https://github.com/blackstardigitalstudio/claude-auto-continue

It does not fix the underlying bug (the setting not being persisted to settings.json), which is still worth tracking here.

blackstardigitalstudio avatar Oct 22 '26 05:10 blackstardigitalstudio

Same behavior in Windows Terminal: either unfocused WT tab or terminal not the foreground app.

ondrejtucny avatar Nov 01 '26 12:11 ondrejtucny

Same on the Claude desktop app (Code tab), Windows 11 Home 10.0.26200, not just the CLI. Checked “resume when usage resets”; the session never resumed overnight (PC awake, plugged in, app open). Confirmed autoContinueAtUsageLimit was missing from ~/.claude/settings.json after checking the bo

pwalth avatar Nov 05 '26 15:11 pwalth

Sorry you're hitting this — when the message is specifically "You've hit your session limit," that's the rolling 5-hour meter, not the weekly one (they are separate). On Desktop, Auto-continue when limits reset is only offered on the session-limit card (not the weekly-limit card), and the CLI toggle in /config is a separate switch. Your own message / Settings → Usage is the source of truth for the reset clock. Sourced breakdown of that session-limit string and recovery options: https://limitwatchai.dev/errors/claude/session-limit/?utm_source=github&utm_medium=social&utm_campaign=session-limit-2026-11-05b

LimitWatchAI avatar Nov 06 '26 04:11 LimitWatchAI

I can reproduce the same issue on Windows using the Claude Code VS Code extension.

Environment

  • OS: Windows 10 Pro (build 19045)
  • Claude Code VS Code extension: 2.1.322
  • Subscription: Claude Pro
  • Separately installed CLI: 2.1.317

Actual behavior

When the 5-hour session limit is reached, the VS Code extension only displays:

You've hit your 5-hour limit · resets 8:30pm (Asia/Tokyo)

The message Continuing automatically at ... does not appear, and the session does not resume automatically after the reset.

Troubleshooting

  • autoContinueAtUsageLimit is absent from the user settings and both project-level settings files.
  • /rate-limit-options returns: /rate-limit-options isn't available in this environment.
  • I have not yet tested auto-continue using the separately installed CLI, so I cannot confirm whether this is specific to the VS Code extension.

This appears to reproduce the same Windows issue reported here, but on the VS Code extension.

Could you confirm whether automatic continuation is expected to work in the Windows VS Code extension, and whether there is a known workaround?

gift0536 avatar Nov 12 '26 12:11 gift0536

Same on the macOS desktop app (Code tab), with log evidence that the miss is intermittent, not just "never arms".

Environment

  • Claude desktop app 5.11492.5, macOS 15.2, Apple Silicon
  • Code tab, local sessions, "Auto-continue when limits reset" ticked on the limit card
  • autoContinueAtUsageLimit is also absent from ~/.claude/settings.json, as others report here

What the app log shows (~/Library/Logs/Claude/main.log, rotated copies included, Oct 28 to Nov 16)

I matched every [CCD CycleHealth] ... hit your 5-hour/session limit · resets <time> line against any LocalSessions.sendMessage to the same session in the hour after the stated reset:

  • Nov 16: 4 sessions limited at 20:58, reset 21:50, card said "Auto-resuming at 9:56 PM". At 21:56:30, 21:56:37 and 21:56:40 three of the four were sent a message within seconds of each other, each with a focus change to that session just before, which looks like the engine. The 4th session got no message in the next hour.
  • Oct 29, reset 15:10: 6 sessions limited, 5 got no message in the following hour. The log shows the Mac was asleep across the reset: [event-loop-stall] main process blocked for 894982ms [likely sleep: power_event], then at 15:10:13 Timer fired 853s late with no resume event — treating as system wake. Only one session received a message, at 15:19.
  • Oct 28, reset 19:10: 6 sessions limited, 4 got no message in the following hour, though three of those were limited again at 20:16, so something resumed them later.
  • Oct 29 at 20:10: all 4 limited sessions were sent a message within 7 seconds of the reset (+0 min). So it can fire on time.

Delay between the stated reset and the message was 0 to 9 minutes in the cases that did fire.

Observations that may help

  1. The only engine line in the log is one per app launch: [LimitAutoResumeEngine] the page sends the continue this run (kill switch absent). Nothing is logged when a resume is scheduled, fires, is skipped or fails, so a miss is invisible. A log line at each of those points would make this diagnosable.
  2. Since the continue is sent from the page, a sleep across the reset time (clamshell and maintenance sleep on battery are frequent on a laptop) seems to lose it. "Keep computer awake while Claude works" does not cover this, because a session sitting on a limit card is not running a turn. On wake the engine should send the continue for any reset that already passed.
  3. When several sessions are limited at once, at least one is skipped in several of the runs above. I can't tell why from the log.

I redacted session ids, paths and account details from this comment. The log lines above are verbatim apart from that.

Andy9822 avatar Nov 17 '26 01:11 Andy9822