claude-code-notifier
how it works guides faq
◐English
English العربية Deutsch Español Français עברית Italiano 日本語 한국어 Nederlands Polski Português (Brasil) Русский Türkçe Tiếng Việt 简体中文 繁體中文
Get started
All guides

Leave Claude Code running and walk away: a workflow

Updated 31 October 2026 · 7 min read
on this page 01Why long tasks stall 02Step 1: write a task that can finish without you 03Step 2: allow the routine, keep the risky 04Step 3: keep the session alive 05Step 4: make the waits reach you 06Step 5: review when you get back 07A checklist to copy 08FAQ

To leave Claude Code running and walk away safely, do four things before you go: keep the computer from sleeping, allow the routine commands Claude will need so it does not stop at every prompt, give it a clear task with a definition of done, and set up a way to hear from it when it finishes or needs a decision. With a phone paired to a tool like Claude Code Notifier, you can then approve, answer or send the next instruction from wherever you are, on Mac, Windows and Linux.

01Why long tasks stall

Claude Code waits for you in three places:

  1. Permission prompts. In the default mode it asks before most shell commands and file edits.
  2. Questions. When it needs you to choose, it asks with AskUserQuestion and waits.
  3. The end of a turn. When it finishes, it waits for your next message.

Any of these can leave a long task sitting idle for an hour while you are out. The routine below removes the needless waits and makes the remaining ones reach you.

02Step 1: write a task that can finish without you

The best way to avoid questions is to answer them up front. Before you leave, tell Claude:

  • What "done" means. "All tests in tests/api pass" is better than "fix the API".
  • How to check its work. Name the test or build command.
  • What it must not do. "Do not change the database schema" or "do not push".
  • What to do if it gets stuck. "If you cannot fix it in a reasonable number of attempts, stop and write up what you tried."

For a bigger change, start in plan mode, agree the plan, then let it run:

claude --permission-mode plan

03Step 2: allow the routine, keep the risky

Each permission prompt is a pause. Decide in advance which commands Claude can run freely. Add allow rules for the safe, repetitive ones in .claude/settings.json or with /permissions:

{
  "permissions": {
    "allow": [
      "Bash(npm test *)",
      "Bash(npm run lint)",
      "Bash(git diff *)"
    ],
    "deny": [
      "Bash(git push *)"
    ]
  }
}

Deny rules win over allow rules, so a deny on git push holds even if something broader is allowed. You can also switch mode. acceptEdits accepts file edits and common file system commands in the working directory without asking. The trade-offs of each mode, including why bypassPermissions belongs only in containers or VMs, are in Claude Code permission modes explained.

Keep a prompt for anything you would want to read first: deleting files, network calls you did not expect, anything touching production.

04Step 3: keep the session alive

If the computer sleeps, Claude Code stops with it. Each operating system has a way to stay awake.

Mac. Run Claude Code under caffeinate, which keeps the Mac awake while the command runs:

caffeinate -i claude

Linux. On systemd distributions, systemd-inhibit blocks sleep for the life of a command:

systemd-inhibit claude

Windows. In Settings, open System and then the power settings, and set the computer not to sleep while plugged in.

On a remote server, or if you might close the terminal, run Claude Code inside tmux or screen so it keeps going when you disconnect:

tmux new -s work
claude
# detach with Ctrl+B then D; reattach later with: tmux attach -t work

Claude Code in tmux or screen covers notifications from detached sessions, and Notifications over SSH covers remote servers.

05Step 4: make the waits reach you

This is where most setups fall short. You need to know when Claude finishes or needs you, and ideally reply without walking back.

You have several choices:

  • Anthropic's Remote Control connects the Claude app to your local session, on supported plans with a claude.ai login. Using Claude Code from your phone explains it and the other phone options.
  • A do-it-yourself hook that sends a push through ntfy, Telegram, Slack or Discord tells you something happened. Replying is up to you. See Send Claude Code notifications to Telegram, Slack or Discord.
  • Claude Code Notifier, which is what the rest of this section describes.

With Claude Code Notifier

Claude Code Notifier is an independent tool by TouchTap Ltd, not made by Anthropic. Its free command line tool, ccn, runs through Claude Code's hooks on Mac, Windows and Linux, and its iPhone and Android apps let you reply. If you have not set it up, Connect your phone to Claude Code takes about a minute.

Once paired, each of the three waits reaches your phone:

  • Finished. A push the moment a turn ends. Right after, you can send the next instruction from the phone, and Claude carries on with it.
  • Permission. Allow once, allow for the session, or deny.
  • Question. Pick one of Claude's options.

Before you leave, run a quick check:

ccn doctor   # hooks, credentials, server connection, presence detection
ccn test     # a test notification to your phone

Tune how long it waits

ccn knows whether you are at the computer. If you typed in the last 30 seconds, the terminal asks as usual. If you are away, the terminal waits for the phone's answer, up to a ceiling, and stops waiting the moment you touch the keyboard. For a long afternoon away, raise the ceiling:

ccn config set hold_ceiling_seconds 1800

It accepts 30 to 3600 seconds and defaults to 600. A related setting, stop_hold_seconds (0 to 600, default 120), controls the wait at the end of a turn for a follow-up from the phone. ccn config show lists everything, and most settings can be changed per computer from the app too.

Do not get woken up

If a task runs overnight, set quiet hours so the phone stays silent while you sleep:

ccn config set quiet_hours 22:00-08:00

More on this in Quiet hours and Do Not Disturb.

The app is free to download and needs a subscription or lifetime purchase to use. Without a phone, ccn still gives free desktop notifications, which help when you are in another room but not when you are out. See pricing.

06Step 5: review when you get back

Walking away is only safe if you look at what happened. When you return:

  • Read the diff before you commit: git diff or your editor's review view.
  • Run the tests yourself.
  • Scroll back through any commands Claude ran, especially ones you approved from the phone.

Working on a branch or in a git worktree makes it easy to throw away a run that went wrong. If you run several sessions at once, Running several Claude Code sessions helps you tell which one is calling.

07A checklist to copy

  1. Task written with a clear finish line and a test command.
  2. Allow rules for routine commands, deny rules for risky ones.
  3. Computer kept awake, or the session in tmux.
  4. Phone paired, ccn doctor and ccn test pass.
  5. Hold ceiling and quiet hours set for how long you will be gone.
  6. Review the diff when you are back.

08FAQ

Will Claude Code keep running if I close my laptop lid?

Usually not, because most laptops sleep when the lid closes and Claude Code runs on the laptop. Keep it awake and plugged in, run on a machine that stays on, or use Anthropic's cloud sessions, which run on Anthropic's infrastructure.

Should I use bypassPermissions so it never stops?

Anthropic's documentation says to use it only in isolated environments such as containers or VMs. For everyday work, allow rules for routine commands and remote approval for the rest is a safer balance.

What if I miss a notification on my phone?

With ccn, the terminal waits up to your hold ceiling, then the request is left for the terminal. When you come back, you can answer there as normal.

Can I start the next task from my phone?

Right after Claude finishes, Claude Code Notifier lets you send a follow-up instruction from the phone, and Claude runs it as its next instruction.

Claude Code Notifier Get a push on your phone when Claude Code finishes or needs you, then approve, deny or answer from there. The ccn command line tool is free on Mac, Windows and Linux.
Download for iOS Download for Android Install ccn

Related guides

  • Approve Claude Code permission requests from your phoneClaude Code's PermissionRequest hook can return allow or deny. Here is how to answer permission prompts from your phone, by hand or with ccn.
  • Claude Code permission modes explained (default, acceptEdits, plan, bypassPermissions)What each Claude Code permission mode does (default, acceptEdits, plan, auto, dontAsk, bypassPermissions), how to switch, and when each is safe.
  • Claude Code in tmux or screen: getting notified from a detached sessionGet notified when Claude Code in tmux or screen finishes or needs you: allow-passthrough, bell alerts, naming the session, and phone pushes when detached.
  • Quiet hours and Do Not Disturb for Claude Code notificationsStop Claude Code notifications at night or in meetings: quiet hours in your hook, Focus and Do Not Disturb on the phone, and ccn's quiet_hours.
claude-code-notifier

Claude Code Notifier is an independent third-party application. It is not affiliated with, endorsed by, or sponsored by Anthropic, PBC. "Claude" and "Claude Code" are trademarks of Anthropic, PBC.

apps iOS App Android App ccn for macOS, Windows & Linux All guides
legal Privacy Policy Terms of Service Other languages © 2026 touchtap. All rights reserved. TouchTap Ltd is registered in England and Wales, company number 13942589.