Get a Notification When Claude Code Finishes (or Needs You)
You kick off a long task, wander off, and come back to find it either finished twenty minutes ago or stuck on a confirmation prompt the entire time. Here are four ways to fix that, roughly in order of "how much do I have to set up."
The options
- Turn on official mobile push — no scripting, but a few preconditions.
- Just ask for it in the prompt — zero setup, works per-task.
- tmux activity monitoring / terminal bell — built into tools you may already use.
- A webhook script you write yourself — full control, full maintenance burden.
1. Official mobile push (start here)
If Remote Control is active, Claude Code can push a notification straight to your phone. Under /config there are two independent toggles: "Push when Claude decides" (the model itself judges when something's worth interrupting you for) and "Push when actions required" (fires specifically when it's blocked on your input). You can also just say it in the prompt — "notify me when the tests finish" works as a one-off instruction. (Source: official docs)
The catch: this is layered on top of Remote Control, which is currently a research preview available on Pro, Max, Team, and Enterprise plans — Team and Enterprise have it off by default until an org owner turns it on. (Source: official docs) You also need the official app installed, and Remote Control has to actually be connected when the task finishes — if it timed out or the process was killed (see our Remote Control troubleshooting piece if that's happening to you), there's nothing left to push from.
2. Ask for it in the prompt
No setup at all — just tell Claude what you want in plain language. This works because the prompt-based path rides the same push mechanism above, so it inherits the same preconditions (Remote Control connected, right plan tier). It's fine for a one-off, but you're re-typing the instruction every session and it only covers what you remembered to ask for.
3. tmux monitor-activity or a terminal bell
If you're already running things in tmux, monitor-activity flags a window when it changes, and most terminals will visually flag or literally ring on a bell character. This costs nothing to set up if you already live in tmux, but it only means something while you're sitting at that machine — walk away, and a flagged window or a bell nobody hears doesn't reach you.
4. Write your own webhook script
Wrap a command so that when it exits, it curls a webhook — a company chat bot, Slack, Discord, whatever you've got. This is the only option here with zero platform lock-in, but the cost shows up per-task: you have to remember to wrap every command individually, forgetting once means silence, and it only ever fires for things you explicitly scripted — it can't cover "the AI decided this moment was worth flagging," only "this specific command finished."
Comparing the four
| Setup cost | Reaches you when phone's locked/away | Covers "AI decides it matters" | |
|---|---|---|---|
| Official push | Low (toggle + app) | Yes | Yes |
| Prompt request | None | Yes | No — only what you asked for |
| tmux / bell | None (if already using tmux) | No — only while at the machine | No |
| Webhook script | Per-command, ongoing | Yes | No — only scripted commands |
Where PocketShell fits
If what you actually want is "any of the CLI coding tools I use — not just Claude Code — reaches my phone when a run finishes or gets stuck, without me writing a wrapper script for every single task," that's a different shape of problem than the four above, each of which covers one tool or one command at a time.
PocketShell wires into the native completion hooks that tools already expose — for Claude Code specifically that means writing to hooks.Notification in ~/.claude/settings.json — rather than scanning processes or guessing what's running. It currently auto-wires four tools this way: Claude Code, Codex, OpenCode, and Kimi. Delivery goes over two channels: Web Push (self-signed VAPID keys, encrypted payload, deep-links back to the exact session) and outbound webhooks with built-in templates for WeCom, Feishu, Slack, and Discord, plus a custom JSON template — each channel has its own on/off switch and test-send button. It also distinguishes "you're actively looking at this session right now" (in-app toast only, no system notification) from "you're elsewhere or the phone's locked" (full system push), with a default 10-second dedup window per session so one noisy task doesn't spam you.
What it doesn't do: it isn't scanning for arbitrary processes, so a tool without a native completion hook doesn't get wired in automatically — right now that's four tools, not "any CLI program." And the environment variables that make hooks fire are injected when a session is created, so a session that already existed before you wired notifications up needs to be recreated to pick it up.