Expose session URL in Notification hook for deep-link notifications
Problem
When running remote/headless sessions, I use the Notification hook to send push notifications (via ntfy) when a session needs approval. This works great — but the notification can't link back to the session.
The hook receives session_id, but there's no URL scheme to turn it into a clickable deep link (e.g., claude.ai/code/session/{session_id}). So when I get the notification on my phone, I have to manually open Claude Code and use /tasks → t to find the waiting session.
Proposed solution
Expose a session URL (or the components to construct one) in the Notification hook input. For example:
{
"session_id": "abc123",
"session_url": "https://claude.ai/code/session/abc123",
...
}
This would allow hooks like:
curl -s -H "Click: $SESSION_URL" -d "Claude Code needs your approval" ntfy.sh/my-topic
Tapping the notification on mobile would open directly to the session that needs attention.
Context
- Running remote agents that hit permission prompts
- Using ntfy for mobile push notifications via the Notification hook
- ntfy (and similar services like Pushover) support click-through URLs, but there's nothing to link to today
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗