Skip to content
86% off$349 $48.86code BF2026

Docs

Glowmoth docs25 pages

Claude Code usage limit resets at 5am: keep your Mac awake

Claude Code says your limit resets at 5am? Keep your Mac awake through the reset with Glowmoth, and learn why waking a sleeping Mac needs pmset.

Updated 6 min read

On this page

You hit the limit late at night, Claude Code says something like "limit reached ∙ resets 5am (Europe/London)", and you want the Mac ready when the window reopens. If the Mac sleeps first, a long-running session can't pick up where it stopped.

Why the Mac isn't ready at the reset

Three things get in the way, most common first:

  1. Idle sleep. The Mac goes to sleep while Claude Code is blocked, because a rate-limited agent is not doing much work. Nothing holds the Mac awake at that point.
  2. Lid closed. Closing a MacBook lid sleeps it, even if a keep-awake session is running, unless closed-lid mode is on.
  3. A safety pause or a stopped session. A low battery, a hot Mac, Stop Everything or Manual mode release Glowmoth's hold.

Waking a Mac that is already asleep is a different problem. Glowmoth tries to schedule a system wake, but macOS normally refuses that for apps without administrator rights. Glowmoth's own text says: "Glowmoth can't wake a sleeping Mac without administrator rights." Its closed-lid helper does not schedule wakes either.

Before you start

  • Glowmoth needs an active MacSuite license or trial. Without a valid one, nothing is kept awake, and scheduling a run from a usage-limit message needs a license.
  • Glowmoth must be running. It has no Dock icon, so look for the moth in the menu bar.
  • For the command-line options, install the tool: Settings > Advanced > Command Line > Command-line tool > Install. It links glowmoth into ~/.local/bin. If your shell can't find it, add that folder to your PATH.

Fix 1: Let the limit message schedule a run

Pass the limit message to glowmoth agent. Glowmoth reads the reset time from it and schedules a run:

bash
glowmoth agent --event your-event-name --message "limit reached ∙ resets 5am (Europe/London)"

Use whatever event name your hook sends. Only a usage-limit message does anything; other events are accepted and ignored for now.

What happens next:

  • The run starts 2 minutes before the reset and lasts 30 minutes.
  • It appears in the panel as "Agent limit reset until …".
  • A newer message replaces the previous run.
  • The command always exits 0, so it is safe in a hook.

To automate it, call the command from your agent's hook. Without --message, glowmoth agent reads the hook's JSON from stdin. Glowmoth has no "Connect" button that edits Claude Code's settings, so you add the hook yourself. We have only documented the message format shown above, so test with that exact wording.

Hold the Mac until the run starts

A scheduled run holds the Mac only from its start time. If the Mac sleeps before then, nothing starts. The run's Keep awake until then option closes that gap by holding the Mac from now until the run begins. It is on by default and is offered when Glowmoth can't schedule a system wake.

Open Settings > Automation > Scheduled Runs and check the run's row. It says "Kept awake until then" when the hold applies, or "Wakes your Mac" if macOS allowed a wake. In the first case the Mac stays awake all night until the run begins.

Fix 2: Hold the Mac awake past the reset

If you would rather not rely on message parsing, start a plain session that ends after the reset:

bash
glowmoth until 05:30 --no-display

This keeps the Mac awake until 05:30, or tomorrow's 05:30 if that time has passed today. --no-display lets the display sleep while the Mac stays awake. You can do the same from the right-click menu with Until > Other Time…. End it early with glowmoth off.

A session ends exactly at its end time, so pick a time after the reset, not at it.

Fix 3: Wake a Mac that is already asleep

macOS's built-in pmset can schedule a wake. This sets a one-time wake at 4:55 AM on the date given (month/day/year, 24-hour time). Replace the date with your own; it asks for your password:

bash
sudo pmset schedule wake "11/14/26 04:55:00"

List scheduled events with pmset -g sched. To cancel this one:

bash
sudo pmset schedule cancel wake "11/14/26 04:55:00"

A woken Mac can fall asleep again if nothing holds it, so pair the wake with Fix 1 or 2.

Which option to pick

SituationBest option
Mac stays awake overnight, you want it automaticFix 1 with Keep awake until then
You know the reset time and want the simplest setupFix 2, glowmoth until a time after the reset
Mac must sleep overnight and wake at the resetFix 3 (pmset), plus Fix 1 or 2
MacBook with the lid closedClosed-lid mode, see below

Limits to know about

SituationWhat happens
Lid closedThe Mac sleeps even with a session running, unless closed-lid mode is on. See closed-lid mode.
Battery below the floor (default 20%)Glowmoth pauses and releases the hold until you plug in or the level recovers.
Mac running hotGlowmoth pauses until it cools.
You choose Stop EverythingAutomatic reasons, including scheduled runs, are suspended until you start a session or relaunch.
Manual mode in the panelScheduled runs are ignored.
Apple menu > Sleep or the power buttonGlowmoth's normal hold does not block manual sleep.

Checklist before you go to bed

  • Glowmoth is running and licensed.
  • The run shows in Settings > Automation > Scheduled Runs (or a session is running).
  • The row says "Kept awake until then".
  • The panel is on Automatic, not Manual, and you did not press Stop Everything.
  • The Mac is plugged in, with the lid open (or closed-lid mode set up).

If it doesn't work

  • The Mac was asleep at 5am. It slept before the run began, or no wake was scheduled. Check for "Kept awake until then", or use Fix 3.
  • Nothing was scheduled. Check that Glowmoth is running and licensed, and that the message wording matches the example.
  • The run is missing from the panel. A newer limit message replaced it, or Stop Everything or Manual mode is active.
  • The Mac was awake but Claude Code didn't continue. Glowmoth doesn't control the agent. Check that the session is still open and resume it yourself.

If none of that explains it, contact support through our support page with this:

text
Glowmoth: Mac slept before a Claude Code limit reset.
Command used: glowmoth agent --event ... --message "limit reached ∙ resets 5am (Europe/London)"
Scheduled Runs row text: (e.g. "Kept awake until then")
Mac model, macOS version, lid open or closed, on power or battery:
What I saw at the reset time:

Common questions

Does Glowmoth restart Claude Code after the reset?

No. It only keeps the Mac awake. You or your own tooling must resume the session.

Why does the run start 2 minutes early?

Glowmoth schedules it 2 minutes before the reset and holds the Mac for 30 minutes, so the Mac is awake when the limit lifts.

Can Glowmoth wake my Mac from sleep?

Not reliably. macOS normally refuses scheduled wakes from apps without administrator rights, so use pmset for that.

Every app.
One purchase.