DEV Community

Yuuichi Eguchi
Yuuichi Eguchi

Posted on

Approve Claude Code Permission Requests from Your Phone

The Problem

Claude Code asks for permission before running tools like Bash, Write, and Edit. This is a great safety feature — but it means you have to be sitting at your terminal to press "y".

Step away for coffee? Claude Code stalls until you get back.

The Solution

claude-remote-approver sends each permission request as a push notification to your phone via ntfy.sh. Tap Approve or
Deny, and Claude Code continues immediately — no terminal required.

How It Works

  Claude Code
    │
    │  PermissionRequest hook (stdin JSON)
    ▼
  claude-remote-approver hook
    │
    ├──POST──▶ ntfy.sh/          ──push──▶  Phone (ntfy app)
    │                                                 │
    │                                           Approve / Deny tap
    │                                                 │
    └──SSE───▶ ntfy.sh/-response  ◀──POST──┘
    │
    │  stdout JSON: { "behavior": "allow" } or { "behavior": "deny" }
    ▼
  Claude Code continues or stops
Enter fullscreen mode Exit fullscreen mode

It uses ntfy.sh, an open-source HTTP-based pub-sub notification service. No account required. The topic name is a 128-bit random string, so only you can receive the notifications.

Setup (3 Steps)

1. Install the ntfy app on your phone

2. Install and run setup on your PC

  npm install -g claude-remote-approver
  claude-remote-approver setup
Enter fullscreen mode Exit fullscreen mode

3. Scan the QR code

The setup command prints a QR code in your terminal. Scan it with the ntfy app to subscribe.

Important: Start a new Claude Code session after setup. The hook is loaded at session startup, so existing sessions won't pick it up.

How It Feels

Once set up, just use Claude Code normally. When a permission request fires:

  1. Your phone buzzes with a notification showing the tool name and a summary (e.g., Bash: npm install express)
  2. Tap Approve or Deny
  3. Claude Code continues instantly

If you don't respond within the timeout (default: 120 seconds), the request is automatically denied. Fail-closed by design.

Sample notification

Other Commands

  claude-remote-approver test      # Send a test notification
  claude-remote-approver status    # Show current config
  claude-remote-approver disable   # Temporarily disable
  claude-remote-approver enable    # Re-enable
  claude-remote-approver uninstall # Remove everything
Enter fullscreen mode Exit fullscreen mode

Security

  • Topic names are generated with crypto.randomBytes(16) (128 bits of entropy)
  • Config file is created with permission 0600 (owner-only)
  • For sensitive work, you can self-host ntfy instead of using the public server

Links

Give it a try and let me know what you think!

Top comments (0)