#!/bin/bash # Voice notification for Claude Code SubagentStop events # Reads hook event JSON from stdin, extracts agent details, posts to voice server INPUT=$(cat) TYPE=$(echo "$INPUT" | jq -r '.agent_type // "Background agent"') # Make agent type human-readable (replace hyphens with spaces) FRIENDLY_NAME=$(echo "$TYPE" | tr '-' ' ') curl -s -X POST http://localhost:8888/notify \ -H "Content-Type: application/json" \ -d "{\"message\": \"The ${FRIENDLY_NAME} agent has finished\"}"