Blog · October 13, 2026 · 8 min read · by Vilva Athiban P B

Is It Possible to Get a Notification When Claude Code or Codex Hits a Reset? Yes for Claude Code: the quota_auto_resume Hooks, Explained

You hit the session limit at 2:10, the banner says it resets at 3:45, and you have two choices: sit there refreshing, or go and do something else and forget to come back until 5. "Is it possible to get a notification when Claude or Codex get a reset?" is one of the most common questions people bring to this site, and until recently the honest answer was "set a timer". For Claude Code that changed: since v2.1.234 it waits in the session, continues the task on its own when the limit resets, and exposes that moment as a hook you can attach a notification to. Codex still needs the timer. This post covers both, with the exact configuration.

First, how the limits work

On a Claude Pro, Max, Team or Enterprise plan, Claude Code draws from the same usage allowance as Claude chat. The allowance resets on a rolling five-hour window and a weekly window, and there are model-family limits on top ("You've hit your Opus limit"). The message you see when you hit one shows when that window resets. /usage shows the plan usage bars at any time, with a d / w toggle for the last 24 hours and the last 7 days. The figures are computed from local session history, so usage on other devices or on claude.ai is not included.

Codex, on a ChatGPT plan, meters usage in a rolling five-hour window with weekly limits as well, shared between the local CLI and cloud tasks. /status shows the chat ID, context usage and your rate limits, including the reset time, and /usage opens the usage and billing settings when you are signed in with ChatGPT. Because the window is sliding, there is no fixed reset hour; the time in /status is the one to trust.

Claude Code: it already waits for the reset

When a claude.ai usage limit stops Claude mid-task, Claude Code (v2.1.234 or later) does not just stop. It keeps the session open and shows two lines at the bottom:

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

At the reset, the second line changes to "Continuing shortly", the conversation records Usage limit reset · continuing automatically, and Claude Code prompts Claude to pick the task up where it stopped without resending your last message. Automatic continue is on by default in interactive sessions signed in with a claude.ai subscription. It still asks for permissions as usual, so a resumed task can stop on a prompt while you are away; if it hits the limit again, it re-arms the wait at most twice in a row.

There are cases where it will not start the wait on its own: a reset more than 24 hours away (a weekly limit can reset days out), Remote Control and agent-team teammate sessions, and an Opus or Sonnet limit while you are running a model outside that family. In those cases it opens a usage-limit options menu once per reset window; pick Wait here, then continue automatically, or run /rate-limit-options yourself. Background sessions, -p runs, API keys and cloud providers never get the wait, because usage there is metered per request and there is nothing to wait for.

One sleep-related detail matters for notifications. If your Mac slept for more than about 30 minutes and the limit reset while it slept, the lines change to Your usage limit has reset / Press enter to continue, and Claude Code waits for you instead of continuing. After a shorter sleep it continues on its own.

The hook that fires when the limit resets

The automatic continue is exposed through the Notification hook event with three matchers, all of which require v2.1.234 or later:

  • quota_auto_resume_fired: Claude Code continues your task after a usage limit paused it, at the reset or sooner if something you did during the wait (adding usage credits, upgrading, switching models) made usage available again.
  • quota_auto_resume_stale: the limit reset while your computer slept for more than about 30 minutes, and Claude Code is waiting for you to press Enter.
  • quota_auto_resume_disabled: the wait ended without continuing, because autoContinueAtUsageLimit was turned off, the reset moved more than 24 hours away, the task kept hitting the limit, or the continuation was blocked. It does not fire when you cancel with Esc or Ctrl+C.

So the notification you want is a Notification hook matched on those three types. On macOS, with osascript, add this to ~/.claude/settings.json (if you already have a hooks block, add Notification as a sibling of the other event keys rather than replacing the object):

{
  "hooks": {
    "Notification": [
      {
        "matcher": "quota_auto_resume_fired",
        "hooks": [
          {
            "type": "command",
            "command": "osascript -e 'display notification \"Usage limit reset. Claude is continuing your task.\" with title \"Claude Code\" sound name \"Glass\"'"
          }
        ]
      },
      {
        "matcher": "quota_auto_resume_stale",
        "hooks": [
          {
            "type": "command",
            "command": "osascript -e 'display notification \"Your usage limit has reset. Press Enter in the terminal to continue.\" with title \"Claude Code\"'"
          }
        ]
      },
      {
        "matcher": "quota_auto_resume_disabled",
        "hooks": [
          {
            "type": "command",
            "command": "osascript -e 'display notification \"Claude stopped waiting for the usage limit. Check the session.\" with title \"Claude Code\"'"
          }
        ]
      }
    ]
  }
}

Type /hooks at the prompt and confirm the three entries appear under Notification. On Linux swap the command for notify-send 'Claude Code' 'Usage limit reset'; on Windows the PowerShell MessageBox one-liner from the hooks guide works. If you would rather be told on your phone, replace the command with a curl to whatever push service you already use; the hook is just a shell command.

The fired matcher is the interesting one, and it is worth being precise about what it means: it does not say "you can type again", it says "Claude has resumed the task you were in the middle of". That is usually better. The thing you were waiting for was the work, not the quota, and the work is now happening. When it finishes, the normal done notification fires, exactly as if the limit had never been hit. The Claude Code notifications guide covers that end of the pipeline.

What if you want the reset itself, not the resume?

If you exited Claude Code, or you were not mid-task when the limit hit, there is no wait to fire a hook from. Two options. The first is to leave the session open and idle: send a trivial prompt ("continue") that hits the limit, let the wait start, and the quota_auto_resume_fired hook becomes your reset alarm. That costs one request at the reset and keeps a terminal tab busy. The second is the low-tech one: read the reset time from the limit message or /usage and set a timer. On macOS a one-off alarm from a spare terminal tab is a single line, with the seconds worked out from the reset time:

# 95 minutes from now, then a native notification
sleep 5700 && osascript -e 'display notification "Claude usage limit reset" with title "Claude Code" sound name "Glass"'

It is not elegant, and it is also exactly what most people were doing before v2.1.234. A phone timer works just as well; the point is that the reset time is printed for you, so there is nothing to compute.

Codex: no hook, so use the timer

Codex does not currently document a hook or notification that fires when a rate limit resets. Its notification system covers turn completion and approval requests (see the Codex CLI notifications guide), and the desktop app adds separate controls for turn-completion alerts and for permission and question alerts, but neither is tied to the usage window. The reliable method is to read the reset time from /status after sending at least one message (the command needs session state), then set the same timer as above.

If you hit the limit in the middle of a turn, Codex stops rather than waiting. When you come back after the reset, the conversation is still there; send "continue" and it picks up from the transcript. Plus and Pro users can also buy extra credits or drop to a smaller model to finish the turn without waiting, which is often the better trade when the reset is hours away.

A sensible setup

  • Leave automatic continue on in Claude Code (it is the default), so a limit mid-task costs you nothing but time.
  • Add the three quota_auto_resume_* Notification hooks so you hear when the task resumes, when it needs an Enter, and when the wait gave up.
  • Keep your done notification in place, because the resumed task ends like any other turn.
  • For Codex, and for a Claude Code limit that hits you between tasks, read the reset time and set a timer; there is no shame in it.
  • If you are hitting limits daily, /usage shows which skills, subagents and MCP servers are eating the allowance; the context management post has the usual fixes.

The underlying shift is that a usage limit in Claude Code is no longer an interruption you have to notice; it is a pause the tool manages and reports. Treat it that way, wire the report to a notification, and the 2:10 limit becomes something you find out about at 3:46, when the work is already moving again.

Keep reading

Desk Exercises for Programmers: 15 Moves to Do While Your AI Agent Codes

7 min read

Exercise While Coding: Turn Claude Code Wait Time Into Micro-Workouts

7 min read

Claude Code Notch Notifications on Mac: See When Claude Is Done Without Watching the Terminal

7 min read

Claude Code Tips and Tricks: 12 Ways to Use Claude Code Effectively

8 min read

Claude Code Multiple Sessions: How to Run Agents in Parallel Without Losing Track

6 min read

A Claude Code Workflow That Doesn't Involve Watching the Terminal

5 min read

Claude Code Hooks: A Practical Guide to Automating Your Agent Workflow

7 min read

Claude Code Auto Mode: Fewer Permission Prompts Without Living Dangerously

7 min read

Claude Code Subagents: How to Delegate Work to Specialized Agents

7 min read

Claude Code Context Management: Treat the Context Window Like a Budget

6 min read

Per-Subagent Model Selection: Route the Grunt Work Down, Keep the Judgment Up Top

7 min read

Skills and Plugins: How to Teach Claude Code Your Way of Working

7 min read

Claude Code Background Tasks: Run Long Commands Without Blocking Your Session

6 min read

Codex CLI Notifications: How to Get a Ding When Codex Is Done or Needs Input

7 min read

Cursor Notification When Done: Every Way to Get Notified When Cursor Finishes

6 min read

Claude Code Notifications: How to Get Notified When Claude Code Finishes or Needs Your Input

6 min read

Want to Be Notified When Claude Responds? How Claude Notifications Work on Web, Desktop, and Mobile

5 min read

Claude Code Notification Scripts: Copy-Paste Recipes for Every Platform

6 min read

Get a Ding the Moment Codex Needs Your Response

6 min read

Get Notified the Moment Claude Code Is Waiting for Your Input

6 min read

“Notifications Are Turned Off for Claude” — Here Is the Fix

6 min read

Codex Sound When Done: Make Codex CLI Play a Sound When It Finishes

6 min read

terminal-notifier + Claude Code: Native macOS Alerts When Your Agent Finishes

6 min read

Gemini CLI Notifications: How to Get a Sound or Alert When Gemini Finishes

6 min read

Get Claude Code Notifications on Your Phone

6 min read

Claude Code Remote Control, Explained

7 min read

preferredNotifChannel: Claude Code's Built-In Notification Setting

6 min read

Claude Code Notifications in tmux and Over SSH

7 min read

Claude Code Effort Levels: Why Your Setting Keeps Getting Ignored

8 min read

Codex vs Claude Code Notifications: How Each One Tells You It Is Done

8 min read

Claude Code Notifications Not Working: A Diagnostic Checklist

10 min read

Claude Code Notifications Inside Your Editor's Terminal

7 min read

CLAUDE_CODE_DISABLE_BACKGROUND_TASKS Explained

7 min read

CLAUDE_CODE_DISABLE_BG_SHELL_PRESSURE_REAP Explained

8 min read

Cursor Alerts Explained: Every Alert Cursor Raises, and How to Control Them

7 min read

Claude Code Environment Variables: The Groups That Actually Matter

10 min read

Claude Code Notifications on WSL and Windows

9 min read

Claude Code Checkpoints and /rewind

8 min read

Claude Remote Control: How It Works, Turning It Off, and Auto Mode

7 min read

Claude Code /loop: Poll a Deploy, Babysit a PR, and Get Told When It's Done

8 min read

Setting Up NotchFit With OpenAI Codex CLI: Hooks, $notchfit-plan, and the Daily Flow

7 min read

Claude Mods Explained: What the New Plugin Layer Can Do, and How to Turn On 'You Should Know'

9 min read

NotchFit vs Mac Break Reminder Apps: A Clock or a Signal From Your Coding Agent?

8 min read

Claude Code Headless Mode: Running claude -p in Scripts and CI, and the Three Signals That It Finished

10 min read

Building a Movement Habit at a Desk: Use the Agent Run as the Cue, One Set as the Unit, and Streaks Carefully

8 min read

Claude Code MCP Servers Explained: Adding Servers, Choosing a Scope, Handling Secrets, and Why Long Tool Calls Go to the Background

10 min read

/notchfit:plan Explained: How Claude Code or Codex Writes a Weekly Workout Plan the Notch Can Actually Run

8 min read

Claude Code Spinner Verbs Explained: What “Pondering” and “Brewing” Mean, How to Change Them, and Why You Should Stop Watching the Spinner

7 min read

Why NotchFit's Done and Permission Alerts Wait Until Your Set Ends, When That Costs You, and How to Turn the Workout Off

7 min read

How to Resume a Claude Code Session: --continue vs --resume, Naming Sessions, the Session Picker, Branching, and What Comes Back

9 min read

NotchFit on a Mac Without a Notch: How Pill Mode Works on Mac mini, iMac, Mac Studio and a MacBook With the Lid Closed

6 min read

How to Run a Claude Code Session in the Background: /background, claude --bg, Agent View, and Getting Back to It

9 min read

What a Notch App Can See: NotchFit's Local-First Design, What the Claude Code and Codex Hooks Send, and What Stays on Your Mac

7 min read

Why Codex CLI Asks for Permission Every Time, and How to Tune the Sandbox and Approval Policy Without Going Full Access

8 min read

What to Do While Claude Code or Codex Works: A Simple Protocol for the Two-to-Twenty-Minute Gap in Every Agent Run

7 min read

What a MacBook Notch App Can Actually Do: The Five Kinds of Notch Utility, Their Trade-offs, and Where NotchFit Fits

7 min read