To keep Claude Code notifications quiet at night or in meetings, you have three layers to work with: the hook itself (skip sending during set hours), the operating system (Focus on iPhone and Mac, Do Not Disturb on Android, Windows and Linux), and the tool you use to send alerts. Claude Code has no quiet-hours setting of its own, so the schedule has to live in your hook script, your phone or your notification tool. With Claude Code Notifier, ccn config set quiet_hours 22:00-08:00 does it in one line.
Which layer you pick matters, because they behave differently. A quiet hook sends nothing. A phone in Do Not Disturb still receives the alert but does not make a sound. The sections below cover each one and when to use it.
01What "quiet" should mean for Claude Code
Before you set anything up, decide what you want to happen to a request that arrives during quiet time. There are three kinds of alert:
- Claude has finished. Safe to hold back. You read it when you look.
- Claude needs a permission. Claude Code waits at the prompt until someone answers. If nothing reaches you, the session sits there until you are back.
- Claude asked a question. Same as a permission: the session waits.
So quiet hours trade sleep for progress. If you start a long task before bed, you may want "finished" alerts silenced but still be able to see a waiting request in the morning. If you want Claude to keep going overnight without asking, that is a permission mode decision, not a notification one.
02Quiet hours in a do-it-yourself hook
Claude Code runs your hook command every time the event fires. To add quiet hours, check the time at the top of the script and exit early. This works for any hook that sends a desktop notification, an ntfy push or a chat message.
On Mac and Linux, save this as ~/.claude/hooks/notify.sh and make it executable with chmod +x:
#!/bin/sh
# Quiet between 22:00 and 08:00, local time
hour=$(date +%H)
if [ "$hour" -ge 22 ] || [ "$hour" -lt 8 ]; then
exit 0
fi
# Your real notification command goes here, for example:
notify-send "Claude Code" "Claude has finished"
On a Mac, replace the last line with an osascript command; the macOS guide has one. Then point the hook at the script in ~/.claude/settings.json:
{
"hooks": {
"Stop": [
{
"hooks": [
{ "type": "command", "command": "~/.claude/hooks/notify.sh" }
]
}
]
}
}
Exiting with code 0 is the important part. Any other code shows a hook error in the transcript, and exit code 2 on a Stop hook tells Claude to keep working, which is not what you want here.
On Windows, do the same check in PowerShell with (Get-Date).Hour. The Windows guide shows a full PowerShell hook.
Pausing hooks completely
For a one-off quiet session, start Claude Code with all hooks off:
claude --settings '{"disableAllHooks": true}'
This lasts for that session only. Setting "disableAllHooks": true in a settings file turns hooks off until you remove it. Note that it turns off every hook, including ones that format code or block commands, so use it with care.
Claude Code's own alerts
Claude Code's built-in terminal notifications are controlled by preferredNotifChannel. Setting it to "notifications_disabled" stops those alerts. It does not stop your hooks, which still run. The terminal bell guide covers the other values.
03Focus and Do Not Disturb on the phone
If your alerts go to a phone, its own quiet modes are the simplest layer, and they work whatever tool sends the alert.
- iPhone: Focus (Settings, then Focus) silences notifications on a schedule. You can choose which apps may still break through. If you want Claude Code alerts at night, add the app to the allowed list; if you want silence, leave it off and the alerts wait in Notification Centre.
- Android: Do Not Disturb (in Settings, under Notifications or Sound, depending on the phone) works the same way, with a schedule and app exceptions. Each app's notification settings also let you turn off sound or vibration for that app only.
The benefit of the phone layer is that nothing is lost: alerts still arrive and wait for you. The downside is that it applies to everything on the phone, so you set it once for your whole evening, not just for Claude Code.
04Quiet on the computer
On the computer, Focus on Mac, Do not disturb on Windows and the do-not-disturb toggle in most Linux desktops silence desktop notifications from hooks. This is useful during screen sharing, when a banner showing a project name or command is the last thing you want on screen.
05Quiet hours with Claude Code Notifier
Claude Code Notifier is an independent tool, not made by Anthropic. Its command line tool, ccn, runs as Claude Code hooks on Mac, Windows and Linux and sends alerts to a paired iPhone or Android phone. It has quiet settings built in, so you do not need to edit a script:
ccn config set quiet_hours 22:00-08:00
During quiet hours, ccn sends nothing to the phone and nothing waits for it: Claude Code asks in the terminal as usual, and the request is there when you come back. Desktop notifications on the computer are also held back during those hours. ccn config set quiet_hours off turns the schedule off again.
The other settings that help:
quiet_when_presentOn by default. While you are at the terminal Claude runs in, the phone gets nothing.notify_on_doneTurn off to stop "Claude has finished" alerts but keep permissions and questions.notify_on_permission, notify_on_questionTurn off either kind of request separately.soundControls the alert sound.desktop_notificationsTurn the desktop notifications on this computer on or off.For example, ccn config set notify_on_done off keeps only the alerts that block Claude. Most of these settings can also be changed per computer from the phone app, which is handy when you have a work laptop and a home desktop with different hours. Run ccn config show to see what is in effect, and ccn sync to pull changes made on the phone.
If you want the opposite, a quiet evening that still lets Claude carry on, the walk-away workflow covers how to leave a session running and answer it from the phone when you choose.
06FAQ
Does Claude Code have a quiet hours setting?
No. Claude Code runs hooks every time an event fires and has no schedule for them. Put a time check in your hook script, use your phone's Focus or Do Not Disturb, or use a tool with quiet hours built in, such as ccn's quiet_hours.
What happens to a permission request during quiet hours?
Claude Code waits at the prompt until someone answers. Quiet hours only stop the alert. If you want Claude to keep working without asking, change the permission mode or add allow rules before you leave.
Will Do Not Disturb on my phone block Claude Code notifications?
It silences them, but they still arrive and wait in the notification list. On iPhone and Android you can add an exception so one app can still alert you during Do Not Disturb.
Can I stop only the "Claude has finished" alerts?
Yes. In a do-it-yourself setup, remove or time-limit your Stop hook. With ccn, run ccn config set notify_on_done off and keep permission and question alerts on.
What time zone does ccn use for quiet hours?
The computer's local time. If you travel, the hours follow the clock on the computer that runs Claude Code.