Send a pushbag notification from Claude Code
Claude Code can run pushbag in a Stop hook to alert your phone when a response finishes. For a single long job, ask Claude to send one message after checking its result.
Give Claude the CLI and guide
Run these commands from the repository where Claude works. The installer places the guide under .agents/skills/pushbag and links it from .claude/skills/pushbag. The guide explains the commands to the agent. It does not store credentials or register a hook.
npm install -g @pushbag/cli
pushbag guide pushbag --install --claude
pushbag auth login
Use the key creation page printed by the last command. For a turn alert, create a Notifications key with permission to publish to Personal. Run pushbag auth set YOUR_KEY in that environment. Install the Android app on Google Play or the iPhone app and use the same account on the phone, or open the dashboard to inspect what the hook sends.
Use .claude/settings.local.json at the repository root for the project-specific hook below. If starting with an empty file, put the entire example object under a top-level property named hooks. Use an absolute executable path in the command if the shell running Claude has a different PATH. Claude settings and hook locations
Test the command the hook will run
Install the CLI and configure a Notifications key in the environment where Claude runs. Test the personal channel first.
pushbag notify "Claude finished responding" --title "Claude Code"
Merge this entry into the hooks object in your Claude Code settings. Keep any existing hooks.
{
"Stop": [{
"hooks": [{
"type": "command",
"command": "pushbag notify 'Claude finished responding' --title 'Claude Code' >/dev/null"
}]
}]
}
A Stop event marks the end of a response. If you need a “tests passed” message, have the test command determine the result before sending it. Claude Code hooks reference
Exercise the hook with a short turn
Start a Claude Code session in the configured project. Ask it to identify the command that runs the tests, then wait for its reply. Look for “Claude Code” on your phone and “Claude finished responding” in Personal. The test does not require running the suite or changing any files. Each later Stop in that project will also send a message, including a reply that asks you to choose between options.
For one alert after a specific job, remove this recurring handler and put the publish command at the decision point in the job instead. For example, ask Claude to run the test command, preserve its exit status and send the name of the first failing suite. Have it report the status separately if delivery fails. Otherwise an error talking to the notification service could be mistaken for a failed test.
If a review needs supporting material, let Claude write a short HTML report in its workspace. Give the publishing shell a Both key and ask for a private upload with a notification. Return the version link in the conversation so the phone alert and the terminal response refer to the same findings.
Frequently asked questions
Can I review the actual output?
Yes. Ask Claude to save the report as HTML and upload it with --notify. Configure a Both key for that workflow.
Where should I put a personal Stop hook?
Use .claude/settings.local.json in the project for a local setting. Merge into the existing hooks object so other events keep their handlers.
Does installing the pushbag skill create a hook?
The install command copies a guide and can link it into Claude’s skills directory. You configure the Stop event separately in Claude Code settings.
Can Claude send an alert only when the suite fails?
Have the shell check the exit status and notify in the failure branch. A Stop event alone contains no proof of a failed test.