<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Artem</title>
    <description>The latest articles on DEV Community by Artem (@achubnet).</description>
    <link>https://dev.to/achubnet</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4256016%2F2fb1992e-bb69-4c4d-9b91-29f066c9f251.jpg</url>
      <title>DEV Community: Artem</title>
      <link>https://dev.to/achubnet</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/achubnet"/>
    <language>en</language>
    <item>
      <title>How to get an iPhone notification when Claude Code finishes or needs you</title>
      <dc:creator>Artem</dc:creator>
      <pubDate>Fri, 20 Nov 2026 15:57:17 +0000</pubDate>
      <link>https://dev.to/achubnet/how-to-get-an-iphone-notification-when-claude-code-finishes-or-needs-you-5baa</link>
      <guid>https://dev.to/achubnet/how-to-get-an-iphone-notification-when-claude-code-finishes-or-needs-you-5baa</guid>
      <description>&lt;p&gt;I start a long task in Claude Code and walk away. Sometimes it finishes. Sometimes it stops after four minutes to ask for a permission, and I find out an hour later.&lt;/p&gt;

&lt;p&gt;Claude Code can tell your phone when either thing happens. It takes one hook and about five minutes. Below are three ways to do it, from free and scripted to a plugin. I built the third one, an iPhone app called AgentAlarm, so read that part knowing I am biased. The first two do not need it.&lt;/p&gt;

&lt;h2&gt;
  
  
  The two events you care about
&lt;/h2&gt;

&lt;p&gt;Claude Code runs &lt;strong&gt;hooks&lt;/strong&gt;: shell commands that fire on its own events. Two matter here:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;Stop&lt;/code&gt; fires when Claude finishes a turn.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;Notification&lt;/code&gt; fires when Claude waits for you. With the matcher &lt;code&gt;permission_prompt&lt;/code&gt; it fires on a permission request, with &lt;code&gt;elicitation_dialog&lt;/code&gt; on a question.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Hooks live in &lt;code&gt;~/.claude/settings.json&lt;/code&gt; for all projects, or in &lt;code&gt;.claude/settings.json&lt;/code&gt; inside one project. The hook fires on the event itself, so the alert does not depend on the model remembering to send it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Way 1: ntfy, free, five minutes
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://ntfy.sh" rel="noopener noreferrer"&gt;ntfy&lt;/a&gt; is a free, open source push service with an iPhone app.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Install the ntfy app and subscribe to a topic with a long random name.&lt;/li&gt;
&lt;li&gt;Add this to &lt;code&gt;~/.claude/settings.json&lt;/code&gt;:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;"hooks"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;"Stop"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
      &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nl"&gt;"hooks"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nl"&gt;"type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"command"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nl"&gt;"command"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"curl -s -m 5 -d 'Claude Code finished' ntfy.sh/your-long-random-topic"&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="nl"&gt;"Notification"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
      &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nl"&gt;"matcher"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"permission_prompt|elicitation_dialog"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="nl"&gt;"hooks"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nl"&gt;"type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"command"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nl"&gt;"command"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"curl -s -m 5 -d 'Claude Code needs you' ntfy.sh/your-long-random-topic"&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="p"&gt;]&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;Start a new Claude Code session and give it something to do.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Two things to know. Anyone who knows a topic name on ntfy.sh can read it, so keep the name long and random and put nothing private in the message, or run your own ntfy server. And this version fires on every stop, also when Claude answers a one-line question while you sit at the keyboard. After a day you will want a filter.&lt;/p&gt;

&lt;h2&gt;
  
  
  Make it quiet: only when you are away
&lt;/h2&gt;

&lt;p&gt;The filter I wanted first: alert me only if I have not touched the computer for two minutes. On a Mac the idle time is one command away. Save this as &lt;code&gt;~/.claude/notify.sh&lt;/code&gt; and run &lt;code&gt;chmod +x ~/.claude/notify.sh&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;#!/bin/bash&lt;/span&gt;
&lt;span class="nv"&gt;input&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nv"&gt;$(&lt;/span&gt;cat&lt;span class="o"&gt;)&lt;/span&gt;
&lt;span class="nv"&gt;project&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nv"&gt;$(&lt;/span&gt;basename &lt;span class="s2"&gt;"$(printf '%s' "&lt;/span&gt;&lt;span class="nv"&gt;$input&lt;/span&gt;&lt;span class="s2"&gt;" | jq -r '.cwd // "&lt;/span&gt;project&lt;span class="s2"&gt;"')"&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;
&lt;span class="nv"&gt;idle&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nv"&gt;$(&lt;/span&gt;ioreg -c IOHIDSystem &lt;span class="o"&gt;|&lt;/span&gt; awk &lt;span class="s1"&gt;'/HIDIdleTime/ {print int($NF/1000000000); exit}'&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="o"&gt;[&lt;/span&gt; &lt;span class="s2"&gt;"$idle"&lt;/span&gt; -ge 120 &lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt; &lt;span class="k"&gt;then&lt;/span&gt;
  curl -s -m 5 -d &lt;span class="s2"&gt;"Claude Code $1 in $project"&lt;/span&gt; ntfy.sh/your-long-random-topic
&lt;span class="k"&gt;fi&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then point both hooks at it:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;"hooks"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;"Stop"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
      &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nl"&gt;"hooks"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nl"&gt;"type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"command"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nl"&gt;"command"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"~/.claude/notify.sh finished"&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="nl"&gt;"Notification"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
      &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nl"&gt;"matcher"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"permission_prompt|elicitation_dialog"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="nl"&gt;"hooks"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nl"&gt;"type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"command"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nl"&gt;"command"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"~/.claude/notify.sh 'needs you'"&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="p"&gt;]&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The hook gets a JSON description of the event on standard input. The script reads the working folder from it, so the message says which project is waiting. It needs &lt;code&gt;jq&lt;/code&gt; (&lt;code&gt;brew install jq&lt;/code&gt; if your Mac does not have it).&lt;/p&gt;

&lt;p&gt;You can keep going from here: skip tasks shorter than a few minutes, allow one alert per five minutes. Each rule is a few more lines and a small state file.&lt;/p&gt;

&lt;h2&gt;
  
  
  Way 2: the Claude app, if you use Remote Control
&lt;/h2&gt;

&lt;p&gt;While a Remote Control session is active, Claude Code can push to the Claude app on your phone. Open &lt;code&gt;/config&lt;/code&gt; and turn on "Push when Claude decides" and "Push when actions required". There is nothing to install if you already work that way. It covers Claude Code only, and only in Remote Control sessions.&lt;/p&gt;

&lt;h2&gt;
  
  
  Way 3: AgentAlarm, the one I built
&lt;/h2&gt;

&lt;p&gt;I wanted those filters without keeping a script alive on every machine, so I built them into an app. AgentAlarm is an iPhone app plus a small CLI. Its Claude Code hook does this by default:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;alerts only after two minutes without keyboard or mouse input;&lt;/li&gt;
&lt;li&gt;says "task finished" only when the turn ran at least three minutes;&lt;/li&gt;
&lt;li&gt;sends at most one alert per session every five minutes;&lt;/li&gt;
&lt;li&gt;puts the project folder name and the task length in the alert, never your prompt, your code or Claude's output.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Setup:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Install AgentAlarm on your iPhone and sign in.&lt;/li&gt;
&lt;li&gt;In Claude Code, add the two plugins:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;/plugin marketplace add achubnet/agentalarm-plugins
/plugin install agentalarm@agentalarm
/plugin marketplace add achubnet/agentalarm-hooks
/plugin install agentalarm-hooks@agentalarm-hooks
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;Run &lt;code&gt;/agentalarm:setup&lt;/code&gt; and approve the connection on your iPhone, then &lt;code&gt;/agentalarm-hooks:setup&lt;/code&gt; for the hooks. It ends with a test notification on your phone.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;If you prefer plain hooks to a plugin, the CLI does the same with three hook lines in &lt;code&gt;settings.json&lt;/code&gt;. The &lt;a href="https://alarm.achub.net/docs/claude-code-notifications/" rel="noopener noreferrer"&gt;setup guide&lt;/a&gt; has them.&lt;/p&gt;

&lt;p&gt;The first plugin gives Claude tools it can use on its own, so you can also ask in the chat:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;"Remind me at 6 pm to review this PR."&lt;/li&gt;
&lt;li&gt;"Tell me when the tests pass."&lt;/li&gt;
&lt;li&gt;"Ring me if the migration fails." That one rings like an alarm, through Silent mode, until you tap Done.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The same CLI has hooks for Codex and Cursor.&lt;/p&gt;

&lt;p&gt;What it does not do: there is no Android version, the app needs iOS 26 or later, and the CLI needs Node 18 or later. Over SSH and on Windows the hook cannot see whether you are at the keyboard, so it alerts every time. The app is free to download and Pro is optional. The source of both plugins is on GitHub: &lt;a href="https://github.com/achubnet/agentalarm-plugins" rel="noopener noreferrer"&gt;agentalarm-plugins&lt;/a&gt; and &lt;a href="https://github.com/achubnet/agentalarm-hooks" rel="noopener noreferrer"&gt;agentalarm-hooks&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Which one to pick
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;You want free, open source or self-hosted, and you do not mind scripting: ntfy.&lt;/li&gt;
&lt;li&gt;You already work in Remote Control and use only Claude Code: the Claude app.&lt;/li&gt;
&lt;li&gt;You want the filters without writing them, reminders your agent can set, or several agents in one place: &lt;a href="https://alarm.achub.net/app?ref=devto-done" rel="noopener noreferrer"&gt;AgentAlarm&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You can also combine them. A hook can run several commands, so you can send to ntfy and to an app at once. I keep a &lt;a href="https://alarm.achub.net/docs/claude-code-notification-apps/" rel="noopener noreferrer"&gt;longer comparison&lt;/a&gt; that also covers Pushover and Telegram.&lt;/p&gt;

&lt;h2&gt;
  
  
  If nothing arrives
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Run the hook command by hand in a terminal first. If the phone stays silent, the problem is not Claude Code.&lt;/li&gt;
&lt;li&gt;Check in iPhone Settings that the app may send notifications, and that no Focus is hiding them.&lt;/li&gt;
&lt;li&gt;Hooks are read when a session starts. After you edit &lt;code&gt;settings.json&lt;/code&gt;, start a new session.&lt;/li&gt;
&lt;li&gt;A longer checklist: &lt;a href="https://alarm.achub.net/docs/claude-code-notifications-not-working/" rel="noopener noreferrer"&gt;Claude Code notifications not working&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Which events would you want a hook for? I am collecting them for the next version.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;I built AgentAlarm. I drafted this post with an AI assistant and checked every command in it before publishing.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>claudecode</category>
      <category>ai</category>
      <category>productivity</category>
      <category>tutorial</category>
    </item>
  </channel>
</rss>
