<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Hooks on brtkwr.com</title><link>https://brtkwr.com/tags/hooks/</link><description>Recent content in Hooks on brtkwr.com</description><generator>Hugo</generator><language>en</language><lastBuildDate>Fri, 17 Apr 2026 17:00:00 +0000</lastBuildDate><atom:link href="https://brtkwr.com/tags/hooks/index.xml" rel="self" type="application/rss+xml"/><item><title>Making Claude Code speak responses with a Stop hook</title><link>https://brtkwr.com/posts/2026-04-17-making-claude-code-speak-responses-with-a-stop-hook/</link><pubDate>Fri, 17 Apr 2026 17:00:00 +0000</pubDate><guid>https://brtkwr.com/posts/2026-04-17-making-claude-code-speak-responses-with-a-stop-hook/</guid><description>&lt;p>&lt;strong>TL;DR:&lt;/strong> I wanted Claude Code to read out each response through &lt;code>say&lt;/code> on macOS so I could step away and listen instead of watching the terminal. Four bugs got in the way: the hook was on the wrong event, &lt;code>tac&lt;/code> does not exist on macOS, the &lt;code>Stop&lt;/code> hook fires before Claude flushes the transcript, and &lt;code>pkill say&lt;/code> clobbered speech from other sessions. A 1-second &lt;code>sleep&lt;/code>, &lt;code>jq -rs&lt;/code>, and a per-session PID file fixed it. I also trim the message to the last non-empty line and strip markdown, so long replies don&amp;rsquo;t drone on and URLs don&amp;rsquo;t get spoken character by character.&lt;/p></description></item></channel></rss>