Back to feed
Dev.to
Dev.to
7/11/2026
claude-code-notify: Reliable Telegram Notifications for Claude Code Sessions

claude-code-notify: Reliable Telegram Notifications for Claude Code Sessions

Original: The Notification That Lied to Me

Short summary

A developer built claude-code-notify, a tool that sends Telegram notifications when Claude Code sessions complete, need sign-off, or error out. The key engineering challenge was that Claude Code's Stop hook fires prematurely for backgrounded Bash commands and subagents, producing false 'finished' signals. The fix requires parsing session transcripts for task-notification elements matching tool_use_ids to confirm true completion before notifying.

  • claude-code-notify sends Telegram alerts when Claude Code turns finish, need input, or fail
  • Naive Stop hooks fire prematurely on backgrounded commands — transcript-based tool_use_id matching is the only reliable signal
  • Error notifications proved most useful: silent dead turns from usage limits are as costly as false 'finished' alerts

Generated with AI, which can make mistakes.

Is this a good recommendation for you?

Comments

Failed to load comments. Please try again.

Explore more