HookStack
Back to catalogue
NotificationSubagentStart

Subagent start voice announcement

Hear each subagent spin up

Announces out loud via TTS when a subagent starts, to track parallel agent activity.

What does the Subagent start voice announcement hook do?

Subagent start voice announcement is a Claude Code SubagentStart hook. It fires automatically at that lifecycle event — outside the model, so it can't be skipped or forgotten. Hear each subagent spin up.

As a SubagentStart hook it runs after the action, reacting to what just happened rather than blocking it. Because it is a deterministic Node.js script, it executes on every matching event without relying on the model to remember — the guarantee that makes agentic workflows safe to automate.

Use cases

  • Audio traceability of parallel agents
  • Track subagent startup without a visual interface

Tags

#tts#subagent#voice#parallel-agents#audio

settings.json fragment

{
  "hooks": {
    "SubagentStart": [
      {
        "hooks": [
          {
            "command": "node $CLAUDE_PROJECT_DIR/.claude/hooks/subagent-start-tts.mjs",
            "type": "command"
          }
        ],
        "matcher": ""
      }
    ]
  }
}

Script · .claude/hooks/subagent-start-tts.mjs

#!/usr/bin/env node
// @hookstack subagent-start-tts-announce
// Annonce le démarrage d'un sous-agent par TTS (SubagentStart)
import { execSync } from "node:child_process";
import { fileURLToPath } from "node:url";

function defaultExec(cmd) {
	execSync(cmd, { timeout: 10_000, stdio: "ignore", shell: true });
}

export function run({ exec = defaultExec, platform = process.platform } = {}) {
	const text = "Sous-agent démarré";
	try {
		if (platform === "darwin") exec(`say "${text}"`);
		else exec(`espeak "${text}" 2>/dev/null || spd-say "${text}"`);
	} catch {}
	return text;
}

/* v8 ignore next 3 */
if (process.argv[1] === fileURLToPath(import.meta.url)) {
	run();
}

Learn more

Related hooks