DEV Community

AGline
AGline

Posted on

Get notified on your phone when a Cursor agent needs approval

Hook: Your Cursor agent finishes a multi-step change, or stops for an approval, while you are in another room. You find out only when you wander back to the desk.

Problem: Cursor can work long enough that watching the chat is a waste of time. The painful case is not only "it finished and I didn't see it." It is "it is waiting for me to approve a command or choose a path, and the run is stalled." Built-in sounds and OS notifications land on the computer that is running Cursor. They do not reach your phone, and they do not carry your answer back into the agent.

Solution: Start with Cursor's own completion sound and OS notification if you are at the machine. If you leave, add a stop hook that posts to ntfy, Pushover, or Slack. If you need the agent to ask a question and receive your reply as text, add an MCP server that can call or text you. AGline is one of those options. The steps below are the exact ones.

What Cursor already gives you

Cursor has two built-in signals, both in Settings (the labels have moved across versions, so search Settings if the path has changed):

  • A completion sound. Version 0.48 described this as Settings > Features > Chat > Play sound on finish. Search for sound if you do not see that path.
  • OS notifications. The 1.5 changelog describes native OS notifications when an agent run finishes or when input is required, for example approving a command that is not allowlisted. Enable them from Settings.

Use these first if you stay near the computer. They use Cursor's own wording, they stay on that machine, and they are not a phone alert.

A stop hook that reaches your phone

Cursor hooks run a command of yours when the agent loop hits a named event. User-level hooks go in ~/.cursor/hooks.json (on Windows, %USERPROFILE%\.cursor\hooks.json). Project hooks go in .cursor/hooks.json. Cursor reloads the files when they change.

A stop hook fires when the agent loop ends. Cursor passes JSON on stdin, including a status of completed, aborted, or error. A minimal ntfy hook looks like this:

{
  "version": 1,
  "hooks": {
    "stop": [
      {
        "command": "curl -s -d \"Cursor agent finished\" ntfy.sh/your-secret-topic"
      }
    ]
  }
}
Enter fullscreen mode Exit fullscreen mode

Install the ntfy app and subscribe to a topic nobody could guess. Anyone who knows a public topic name can read it. Pushover or a Slack webhook is the same idea: the hook makes an HTTP request.

If you want the message to include the status, use a small script that reads stdin, as community hooks such as cursor-ntfy-on-stop-hook do. Cursor's hooks docs also note that a stop hook can print a followup_message; a notification hook should print nothing or {} so it does not accidentally send a new prompt.

Two limits are worth knowing up front:

  • A stop hook tells you the loop ended. It is a "done" or "stopped" ping. It is not, by itself, an approval dialog on your phone.
  • User-level hooks in ~/.cursor/hooks.json are not available to Cursor's cloud agents. Those agents can run a project's .cursor/hooks.json on Cursor's machine, not yours, which may not be able to reach a local script or a private network.

If a new hook does not load, check the Hooks tab or the Hooks output channel, and restart Cursor if needed.

When the agent needs a decision, not only a ping

A one-way push is enough when you only need to walk back to the desk. It is not enough when the agent is blocked on a question: approve the deploy, pick a branch name, choose which failing test to fix first. For that, the agent needs a way to reach you and a way to read your reply.

AGline, built by Ayushman Singh, is one MCP option for that loop. You get a 10-digit AGline number. The agent can text the number or ring it, and your spoken or typed reply comes back as text. It does not call a regular phone number. There is no iPhone app; iPhone users can add the web app to the Home Screen and turn on call notifications from My Number. Mac, Windows, Android APK (not on Google Play), and the web app are the supported clients.

Get a number

Open https://agline.in. No account or email is required. Keep the recovery key. The first number is free for 30 days, with no card. After that it is ₹199 per month, and you can request a full refund within 7 days of the first payment. See pricing and refunds.

Add the server in Cursor

Create or edit ~/.cursor/mcp.json:

{
  "mcpServers": {
    "agline": { "url": "https://agline.in/mcp" }
  }
}
Enter fullscreen mode Exit fullscreen mode

If the number only accepts agents with a key, create one under My Number, Agent keys, and store it in the client config, not in a chat:

{
  "mcpServers": {
    "agline": {
      "url": "https://agline.in/mcp",
      "headers": { "Authorization": "Bearer ck_YOUR_AGENT_KEY" }
    }
  }
}
Enter fullscreen mode Exit fullscreen mode

Test and day-to-day use

Tell the agent your 10-digit number once, and tell it not to guess:

Call my AGline number <your 10-digit number> and ask me one yes/no question to confirm this connection works.
Enter fullscreen mode Exit fullscreen mode

The tools are call, poll_result, send_message, and read_replies. A call waits about 30 seconds and may return a call_id for poll_result. Keep the thread_token that is returned the first time a thread name is used.

A practical split: keep the stop hook for a quiet "the agent finished" push, and ask the agent to call only when it needs an approval or a decision. For "done" updates, send_message is enough. You can set quiet hours and a calls-per-hour limit on My Number.

Other honest options

  • Stay at the desk: Cursor's sound and OS notification.
  • Phone ping, no reply: stop hook plus ntfy, Pushover, or Slack. Community hooks already exist if you would rather not write the script.
  • Reply from your phone: an MCP server that can call or text you (AGline, or another tool in that category if you already use one).

Do not expect a hook to invent a two-way conversation, and do not expect AGline to ring a regular mobile number. Pick the path that matches whether you need a nudge or an answer.

Top comments (0)