<?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>Forem: Israel Saba</title>
    <description>The latest articles on Forem by Israel Saba (@israelsaba).</description>
    <link>https://forem.com/israelsaba</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.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3707808%2Fb9d70760-0b00-44a3-b2c9-5642deb6458c.jpg</url>
      <title>Forem: Israel Saba</title>
      <link>https://forem.com/israelsaba</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/israelsaba"/>
    <language>en</language>
    <item>
      <title>Stop wasting time on vibe coding</title>
      <dc:creator>Israel Saba</dc:creator>
      <pubDate>Tue, 13 Jan 2026 00:24:34 +0000</pubDate>
      <link>https://forem.com/israelsaba/stop-tab-switching-push-claude-code-updates-to-your-phone-with-ntfy-e6e</link>
      <guid>https://forem.com/israelsaba/stop-tab-switching-push-claude-code-updates-to-your-phone-with-ntfy-e6e</guid>
      <description>&lt;p&gt;Have you ever left Claude Code to chew on a hard task,  only to learn it stopped 1s after you were out?&lt;/p&gt;

&lt;p&gt;Giving Claude Code full access to your computer is not the wisest decision, so the next safest alternative is actually deciding on permission queries that need your attention.&lt;/p&gt;

&lt;p&gt;So, assuming you took the safest route, as I did, there is a way to not lose queries from Claude code when you are away from your desk, and I explain it here.&lt;/p&gt;

&lt;p&gt;Please note the Roadmap, where I will add a way to make decisions on the go too.&lt;sup&gt;**&lt;/sup&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  How to tackle the problem
&lt;/h2&gt;

&lt;p&gt;We will use an open-source app called ntfy that sends custom notifications directly to your mobile. It can be installed on your iOS or Android mobile and you can use it for free.&lt;sup&gt;***&lt;/sup&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Option 1 - Quick-win
&lt;/h2&gt;

&lt;p&gt;Use ntfy claude, as opposed to self-hosted, without a de-bouncer&lt;/p&gt;

&lt;h3&gt;
  
  
  NTFY Setup
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;Sign-up at &lt;a href="https://ntfy.sh/app" rel="noopener noreferrer"&gt;ntfy app&lt;/a&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ft7ggtm8sdwgipd4jelh4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ft7ggtm8sdwgipd4jelh4.png" alt=" " width="800" height="181"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Sign-in and access your dashboard&lt;/li&gt;
&lt;li&gt;Click &lt;code&gt;Subscribe to topic&lt;/code&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fl39hopo7lfrksp7t185i.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fl39hopo7lfrksp7t185i.png" alt="Step 3" width="687" height="482"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Click &lt;code&gt;GENERATE NAME&lt;/code&gt;&lt;sup&gt;*&lt;/sup&gt; -&amp;gt; &lt;code&gt;SUBSCRIBE&lt;/code&gt; and take note of the topic&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fm0rjovtr0yxultur83nd.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fm0rjovtr0yxultur83nd.png" alt="Step 4" width="745" height="669"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Click on your avatar at the top -&amp;gt; Click your username&lt;/li&gt;
&lt;li&gt;At &lt;code&gt;Access tokens&lt;/code&gt; click &lt;code&gt;Create access token&lt;/code&gt;, choose a name (e.g. claude-code), click &lt;code&gt;CREATE TOKEN&lt;/code&gt; and take note of the created token (it is always available at the user settings).&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwtg1jresnyyiy5bhvx5c.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwtg1jresnyyiy5bhvx5c.png" alt="Steps 5 and 6" width="738" height="644"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F329js0nlafxeaojlkam0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F329js0nlafxeaojlkam0.png" alt="Step 6" width="748" height="440"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fastppphf7cgs6yttcld5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fastppphf7cgs6yttcld5.png" alt="Step 6" width="800" height="244"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Download NTFY app to your mobile and enable notifications&lt;/li&gt;
&lt;li&gt;Sign-in to your ntfy account in the app (make sure you are subscribed to topic created on 4.)&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Claude Code Setup
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;Edit &lt;code&gt;~/.claude/settings.json&lt;/code&gt; (create if needed) to have it as below
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{
  "hooks": {
    "PermissionRequest": [
      {
        "matcher": "*",
        "hooks": [
          {
            "type": "command",
            "command": "curl -H 'Authorization: Bearer &amp;lt;your-token-from-step-6-above&amp;gt;' -v -L -d 'Claude Code is requesting your input to move on' ntfy.sh/&amp;lt;topic-ntfy-step-4&amp;gt;"
          }
        ]
      }
    ],
"Stop": [
      {
        "matcher": "*",
        "hooks": [
          {
            "type": "command",
            "command": "curl -H 'Authorization: Bearer &amp;lt;your-token-from-step-6-above&amp;gt;' -v -L -d 'Claude Code has finished working' ntfy.sh/&amp;lt;your-topic-name-from-step-4&amp;gt;"
          }
        ]
      }
    ]
  }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Start a new claude session and enjoy!&lt;/p&gt;

&lt;h2&gt;
  
  
  Option 2: de-bouncing add-on
&lt;/h2&gt;

&lt;p&gt;To avoid multiple notifications at the same time we can add a de-bouncer.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Create the de-bouncer script at the path &lt;code&gt;~/.claude/scripts/ntfy-debouncer.sh&lt;/code&gt; below
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;#!/usr/bin/env bash
set -euo pipefail

NTFY_SERVER_URL="ntfy.sh"
NTFY_TOPIC="&amp;lt;your-topic-name-from-step-4&amp;gt;"
LOGFILE="/tmp/ntfy-hook.log"
TOKEN="&amp;lt;your-token-from-step-6-above&amp;gt;"

exec &amp;gt;&amp;gt;"$LOGFILE" 2&amp;gt;&amp;amp;1

LOCKFILE="/tmp/claude-notify-last"
COOLDOWN=30


if [[ -f "$LOCKFILE" ]]; then
  LAST="$(cat "$LOCKFILE")"
  NOW="$(date +%s)"
  if (( NOW - LAST &amp;lt; COOLDOWN )); then
    exit 0
  fi
fi
date +%s &amp;gt;"$LOCKFILE"

MSG="${1:-}"
[[ -n "$MSG" ]] || exit 2

curl -v \
  -H "Authorization: Bearer ${TOKEN}" \
  -L \
  -d "$MSG" \
  "https://${NTFY_SERVER_URL}/${NTFY_TOPIC}"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Chmod the script
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;chmod&lt;/span&gt; +x .claude/scripts/ntfy-debouncer.sh
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Update &lt;code&gt;~/.claude/settings.json&lt;/code&gt; to use it
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{
  "hooks": {
    "PermissionRequest": [
      {
        "matcher": "*",
        "hooks": [
          {
            "type": "command",
            "command": "$HOME/.claude/scripts/ntfy-debouncer.sh 'Claude Code is requesting your input to move on'"
          }
        ]
      }
    ],
"Stop": [
      {
        "hooks": [
          {
            "type": "command",
            "command": "$HOME/.claude/scripts/ntfy-debouncer.sh 'Claude Code has finished working'"
          }
        ]
      }
    ]
  }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Option 3: token security
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Create a keychain entry on your terminal
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;security add-generic-password -a "$USER" -s "ntfy.sh" -w "&amp;lt;your-token-from-step-6-above&amp;gt;" -U
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;at &lt;code&gt;~/.claude/scripts/ntfy-debouncer.sh&lt;/code&gt; paste
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;#!/usr/bin/env bash
set -euo pipefail

NTFY_SERVER_URL="ntfy.sh"
NTFY_TOPIC="&amp;lt;your-topic-name-from-step-4&amp;gt;"
LOGFILE="/tmp/ntfy-hook.log"

exec &amp;gt;&amp;gt;"$LOGFILE" 2&amp;gt;&amp;amp;1

LOCKFILE="/tmp/claude-notify-last"
COOLDOWN=30


if [[ -f "$LOCKFILE" ]]; then
  LAST="$(cat "$LOCKFILE")"
  NOW="$(date +%s)"
  if (( NOW - LAST &amp;lt; COOLDOWN )); then
    exit 0
  fi
fi
date +%s &amp;gt;"$LOCKFILE"

MSG="${1:-}"
[[ -n "$MSG" ]] || exit 2

# Storing the token
# security add-generic-password -a "$USER" -s "ntfy.sh" -w "tk_XXX" -U

TOKEN="$(security find-generic-password -a "$USER" -s "$NTFY_SERVER_URL" -w 2&amp;gt;/dev/null || true)"
if [[ -z "${TOKEN}" ]]; then
  echo "ERROR: token not found in Keychain (service: ntfy.israelsaba.com.br, account: $USER)" &amp;gt;&amp;amp;2
  exit 3
fi

curl -v \
  -H "Authorization: Bearer ${TOKEN}" \
  -L \
  -d "$MSG" \
  "https://${NTFY_SERVER_URL}/${NTFY_TOPIC}"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Roadmap
&lt;/h2&gt;

&lt;p&gt;Other things I'd like to explore/write about regarding this. Let me know what you would like first. Do let me know your thoughts and any extra tips.&lt;/p&gt;

&lt;p&gt;[X] &lt;del&gt;Explore a more secure option using MacOS secrets to store the NTFY token&lt;/del&gt;&lt;br&gt;
[ ] Write about my self-hosted instance of ntfy and how I connect it here&lt;br&gt;
[ ] Explore using the "Notification" hook on Claude Code&lt;/p&gt;

&lt;p&gt;&lt;sup&gt;reference docs: &lt;a href="https://code.claude.com/docs/en/hooks#notification" rel="noopener noreferrer"&gt;Claude Code hooks&lt;/a&gt;, &lt;a href="https://docs.ntfy.sh/" rel="noopener noreferrer"&gt;NTFY&lt;/a&gt;&lt;/sup&gt;&lt;/p&gt;

&lt;p&gt;&lt;sup&gt;*It is important to generate a random topic name as this is a public platform. If you name it &lt;code&gt;claude-code&lt;/code&gt; for instance, anyone who has done the same will be able to push notifications to your ntfy. That can be solved by running a self-hosted instance.&lt;/sup&gt;&lt;/p&gt;

&lt;p&gt;&lt;sup&gt;**Do check this &lt;a href="https://youtu.be/s96JeuuwLzc?si=mslsGJQUfsWeFHy2" rel="noopener noreferrer"&gt;NetworkChuck's video&lt;/a&gt; on the matter. It solves the same problem with n8n and Slack, and it even includes a way to answer the prompt on the go.&lt;/sup&gt;&lt;/p&gt;

&lt;p&gt;&lt;sup&gt;***Tutorial made using MacOS as base. Although shell script shebang is designed for maximum compatibility.&lt;/sup&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>productivity</category>
      <category>devops</category>
      <category>automation</category>
    </item>
  </channel>
</rss>
