Get a phone notification when Claude Code needs approval

Claude Code stops when it needs your yes. A Notification hook can push that to your phone. Trek can also let you answer from it.

What Claude Code gives you

Claude Code runs a hook on its Notification event. With the matcher permission_prompt it fires once an approval has waited about six seconds. With idle_prompt it fires when Claude finished about a minute ago and you haven’t typed since.

A hook is a shell command. So it can send a message anywhere a command can.

A push with ntfy

ntfy is a free push service with apps for iPhone and Android. Subscribe to a topic in the app. Anything posted to that topic shows up on your phone.

Add this to ~/.claude/settings.json. Pick a long random topic name. On the public ntfy.sh server, anyone who knows the name can read it.

{
  "hooks": {
    "Notification": [
      {
        "matcher": "permission_prompt",
        "hooks": [
          {
            "type": "command",
            "command": "curl -s -d 'Claude needs you' https://ntfy.sh/your-random-topic"
          }
        ]
      }
    ]
  }
}

The hook also gets the event as JSON on standard input. Its message field holds the notification text. A short script can read it and send that instead.

To test it, ask Claude to run a command it has to ask you about. Then wait a few seconds.

Answering from the phone

A push only tells you. To say yes you still need the terminal. Some people reach it with SSH and tmux from a phone app.

Claude Code also has a PermissionRequest hook. It can allow or deny a request by itself. Several open-source tools use it to put Allow and Deny buttons in a notification. Read what such a tool sends, and where, before you install it.

With Trek

Trek is a free desktop app that runs Claude Code and other agents in one window. Each approval shows as a card in its thread. That thread moves to the top of the sidebar until you answer.

To answer from your phone, open Settings › Phone & Machines in Trek. Turn on Let your phone connect. Then turn on Tell my phone when a thread needs me and pick When I’m away or Always. Away means no keyboard or mouse for two minutes, or a locked screen.

Now pair a phone.

  • Any phone’s browser, at trekdesktop.com/remote. On Android it works in Chrome, Edge and Samsung Internet. On an iPhone it needs iOS 26.4 or later. Add it to the Home Screen, then tap Turn on notifications in its Settings.
  • Trek for iPhone. It is built from source in Xcode for now. Its notifications come through the ntfy app. Turn on Also through the ntfy app in Trek and subscribe to the topic it shows. The ntfy server can read what is sent.

A notification says only that a thread needs you. Turn on Name the thread and its project to see which one.

Both phones show the request with Allow and Deny. They connect straight to your computer, over your Wi-Fi or Tailscale. No Trek server sits in between.

Trek never answers for you.

Trek is free and open source, for Mac and Windows, with a Linux preview.

Get Trek More posts