@hrushiborhade/pingme
v1.2.2
Published
Get texted when your Claude agent is stuck
Maintainers
Readme
pingme
pingme hooks into Claude Code's lifecycle events and texts your phone when your agent actually needs you.
The Problem
You're running multiple Claude Code instances across tmux panes. One stops because it needs permission or has a question. You think it's still working. Hours later, you find it blocked. Time wasted.
Quick Start
npx @hrushiborhade/pingme initFollow the prompts — enter your Twilio credentials, choose which events should trigger an SMS, and you're done.
Supported Events
SMS notifications for 14 Claude Code hook events — you choose which ones:
Enabled by default: | Event | Description | |-------|-------------| | ✅ Task completed | Agent finished a task | | 🛑 Agent stopped | Agent stopped running | | ❓ Asking question | Agent is asking you a question | | 🔔 Notification | Agent sent a notification | | 🔐 Needs permission | Agent needs your permission to proceed |
Available (off by default): | Event | Description | |-------|-------------| | ❌ Tool failed | A tool call failed | | 🤖 Subagent finished | A subagent finished running | | 🔴 Session ended | Claude Code session ended | | 🟢 Session started | Claude Code session started | | 🚀 Subagent started | A subagent started running | | 💤 Teammate idle | A teammate agent is idle | | 📦 Pre-compact | Context is about to be compacted | | 📝 Prompt submitted | User submitted a prompt (spammy) | | 🔧 Pre tool use | About to use a tool (spammy) |
Each SMS includes:
- Project name — which codebase needs you
- tmux context — which pane to jump to (if applicable)
- Reason — what the agent needs
- Context — extracted from JSON input via
jq(with raw text fallback)
Commands
npx @hrushiborhade/pingme init # Setup pingme
npx @hrushiborhade/pingme events # Change which events trigger SMS
npx @hrushiborhade/pingme test # Send a test SMS
npx @hrushiborhade/pingme uninstall # Remove pingme (hook + settings)
npx @hrushiborhade/pingme --version # Show version
npx @hrushiborhade/pingme --help # Show helpHow It Works
pingme uses Claude Code's hooks system to detect when the agent needs your attention.
Installation —
npx @hrushiborhade/pingme initcreates:- A bash script at
~/.claude/hooks/pingme.shthat sends SMS via Twilio - Hook entries in
~/.claude/settings.jsonfor each selected event
- A bash script at
Hook Triggers — Hooks are registered for your selected events:
TaskCompleted— when a task finishesPostToolUse(matcher:AskUserQuestion) — when Claude asks a questionStop— when Claude stops executionPermissionRequest— when Claude needs permission- ...and any other events you enable
Notification Flow — When triggered, the hook script:
- Detects your current project name from the working directory
- Captures tmux session/window/pane info (if available)
- Extracts context from JSON stdin using
jq(with raw text fallback) - Sends an SMS via Twilio's API
Reconfiguration — Run
npx @hrushiborhade/pingme eventsanytime to change which events trigger SMS without re-entering Twilio credentials.
Example SMS
✅ agentQ
📍 dev:2.1 (main)
💬 Task completedSetup
Prerequisites
- Node.js 18+
- Twilio account (free trial includes $15 credit)
- Claude Code CLI
curl(pre-installed on most systems)jq(optional — enables richer context extraction from JSON input)
Twilio Configuration
- Sign up at twilio.com/console
- Get your Account SID and Auth Token from the dashboard
- Get a phone number (or use the trial number)
- Run
npx @hrushiborhade/pingme initand follow the prompts
Security
pingme implements comprehensive security measures:
- Credential Storage: Stored locally in
~/.claude/hooks/pingme.shwith0o700permissions (owner-only access) - Shell Injection Prevention: All credentials are escaped before being written to the hook script
- Input Validation: Twilio credentials and phone numbers are validated with strict regex patterns
- File Integrity: Write operations are verified and protected against symlink attacks
- JSON Validation: Configuration files are validated for proper structure with error recovery
- No Network Access: Only communicates with Twilio's API over HTTPS
- Minimal Dependencies: Only 2 production dependencies to reduce attack surface
For more details, see SECURITY.md.
Troubleshooting
SMS not sending
- Run
npx @hrushiborhade/pingme testto verify credentials - Check your Twilio balance (free trial includes $15 credit)
- Verify both phone numbers include country code (e.g.,
+1for US) - Twilio trial accounts can only send to verified numbers
Hook not triggering
- Restart Claude Code — hooks are loaded on startup
- Verify hooks are present in
~/.claude/settings.json - Check script permissions:
chmod +x ~/.claude/hooks/pingme.sh
curl not found
Install via your package manager:
- macOS:
brew install curl(usually pre-installed) - Ubuntu/Debian:
sudo apt install curl
Contributing
Contributions are welcome.
git clone https://github.com/HrushiBorhade/pingme.git
cd pingme
npm install
npm run dev # Watch mode
npm run build # Build for production
npm test # Run tests- Fork the repository
- Create a feature branch:
git checkout -b feature/my-feature - Make your changes and run
npm run build && npm test - Open a Pull Request
Ideas for Contribution
- Support for other notification providers (Slack, Discord, Pushover)
- Rate limiting to prevent SMS spam
- Quiet hours configuration
- Custom message templates
