logoalt Hacker News

tomashubelbauertoday at 12:54 PM1 replyview on HN

TIL that HA notifications can have associated actions. I have the exact same setup as you, except I only receive the notification and then walk over to the laptop to unblock the agent feeling like a human tool call. This will improve my workflow, thank you.


Replies

moonteartoday at 1:06 PM

The notification payload for reference, you will also need a permission input_select (pending/allow/deny) and an automation that triggers upon mobile_app_notification_action:

  notification_payload=$(cat <<EOF
  {
    "message": "$escaped_message",
    "title": "$escaped_title",
    "data": {
      "tag": "$escaped_request_id",
      "group": "claude-code",
      "actions": [
        {
          "action": "CLAUDE_ALLOW",
          "title": " Allow"
        },
        {
          "action": "CLAUDE_DENY",
          "title": " Deny"
        }
      ]
    }
  }
  EOF
  )

Actionable notifications are a bit cumbersome on iOS since you need to long-press the notification for actions, but it does work.