[{"data":1,"prerenderedAt":1498},["ShallowReactive",2],{"guide:/guides/claude-code-sound-when-done":3},{"_path":4,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":8,"description":9,"tag":10,"date":11,"body":12,"_type":1492,"_id":1493,"_source":1494,"_file":1495,"_stem":1496,"_extension":1497},"/guides/claude-code-sound-when-done","guides",false,"","Play a sound when Claude Code finishes","A one-line Claude Code hook that plays a sound the moment a run finishes, on macOS, Linux and Windows, so you can look away and still know when it is done.","Notifications","2026-08-15",{"type":13,"children":14,"toc":1480},"root",[15,32,70,77,90,226,285,291,304,409,468,474,479,630,650,669,675,695,870,875,881,923,929,948,1120,1141,1147,1187,1193,1198,1312,1331,1393,1398,1404,1425,1431,1463,1474],{"type":16,"tag":17,"props":18,"children":19},"element","p",{},[20,23,30],{"type":21,"value":22},"text","Sometimes you do not want a notification pop-up, just a sound: a little chime when Claude Code finishes so you can keep your eyes on something else. That is a two-minute setup with the ",{"type":16,"tag":24,"props":25,"children":27},"code",{"className":26},[],[28],{"type":21,"value":29},"Stop",{"type":21,"value":31}," hook.",{"type":16,"tag":17,"props":33,"children":34},{},[35,37,44,46,52,54,60,62,68],{"type":21,"value":36},"If hooks are new to you, skim the ",{"type":16,"tag":38,"props":39,"children":41},"a",{"href":40},"/guides/claude-code-hooks",[42],{"type":21,"value":43},"complete guide to Claude Code hooks",{"type":21,"value":45}," first; otherwise, here are the one-liners per platform. All of them go in a ",{"type":16,"tag":24,"props":47,"children":49},{"className":48},[],[50],{"type":21,"value":51},"settings.json",{"type":21,"value":53},", either ",{"type":16,"tag":24,"props":55,"children":57},{"className":56},[],[58],{"type":21,"value":59},"~/.claude/settings.json",{"type":21,"value":61}," for every project or ",{"type":16,"tag":24,"props":63,"children":65},{"className":64},[],[66],{"type":21,"value":67},".claude/settings.json",{"type":21,"value":69}," for one repository.",{"type":16,"tag":71,"props":72,"children":74},"h2",{"id":73},"macos",[75],{"type":21,"value":76},"macOS",{"type":16,"tag":17,"props":78,"children":79},{},[80,82,88],{"type":21,"value":81},"Play a built-in system sound with ",{"type":16,"tag":24,"props":83,"children":85},{"className":84},[],[86],{"type":21,"value":87},"afplay",{"type":21,"value":89},":",{"type":16,"tag":91,"props":92,"children":96},"pre",{"className":93,"code":94,"language":95,"meta":7,"style":7},"language-json shiki shiki-themes github-light github-dark","{\n  \"hooks\": {\n    \"Stop\": [\n      { \"hooks\": [{ \"type\": \"command\", \"command\": \"afplay /System/Library/Sounds/Glass.aiff\" }] }\n    ]\n  }\n}\n","json",[97],{"type":16,"tag":24,"props":98,"children":99},{"__ignoreMap":7},[100,112,127,141,199,208,217],{"type":16,"tag":101,"props":102,"children":105},"span",{"class":103,"line":104},"line",1,[106],{"type":16,"tag":101,"props":107,"children":109},{"style":108},"--shiki-default:#24292E;--shiki-dark:#E1E4E8",[110],{"type":21,"value":111},"{\n",{"type":16,"tag":101,"props":113,"children":115},{"class":103,"line":114},2,[116,122],{"type":16,"tag":101,"props":117,"children":119},{"style":118},"--shiki-default:#005CC5;--shiki-dark:#79B8FF",[120],{"type":21,"value":121},"  \"hooks\"",{"type":16,"tag":101,"props":123,"children":124},{"style":108},[125],{"type":21,"value":126},": {\n",{"type":16,"tag":101,"props":128,"children":130},{"class":103,"line":129},3,[131,136],{"type":16,"tag":101,"props":132,"children":133},{"style":118},[134],{"type":21,"value":135},"    \"Stop\"",{"type":16,"tag":101,"props":137,"children":138},{"style":108},[139],{"type":21,"value":140},": [\n",{"type":16,"tag":101,"props":142,"children":144},{"class":103,"line":143},4,[145,150,155,160,165,170,176,181,185,189,194],{"type":16,"tag":101,"props":146,"children":147},{"style":108},[148],{"type":21,"value":149},"      { ",{"type":16,"tag":101,"props":151,"children":152},{"style":118},[153],{"type":21,"value":154},"\"hooks\"",{"type":16,"tag":101,"props":156,"children":157},{"style":108},[158],{"type":21,"value":159},": [{ ",{"type":16,"tag":101,"props":161,"children":162},{"style":118},[163],{"type":21,"value":164},"\"type\"",{"type":16,"tag":101,"props":166,"children":167},{"style":108},[168],{"type":21,"value":169},": ",{"type":16,"tag":101,"props":171,"children":173},{"style":172},"--shiki-default:#032F62;--shiki-dark:#9ECBFF",[174],{"type":21,"value":175},"\"command\"",{"type":16,"tag":101,"props":177,"children":178},{"style":108},[179],{"type":21,"value":180},", ",{"type":16,"tag":101,"props":182,"children":183},{"style":118},[184],{"type":21,"value":175},{"type":16,"tag":101,"props":186,"children":187},{"style":108},[188],{"type":21,"value":169},{"type":16,"tag":101,"props":190,"children":191},{"style":172},[192],{"type":21,"value":193},"\"afplay /System/Library/Sounds/Glass.aiff\"",{"type":16,"tag":101,"props":195,"children":196},{"style":108},[197],{"type":21,"value":198}," }] }\n",{"type":16,"tag":101,"props":200,"children":202},{"class":103,"line":201},5,[203],{"type":16,"tag":101,"props":204,"children":205},{"style":108},[206],{"type":21,"value":207},"    ]\n",{"type":16,"tag":101,"props":209,"children":211},{"class":103,"line":210},6,[212],{"type":16,"tag":101,"props":213,"children":214},{"style":108},[215],{"type":21,"value":216},"  }\n",{"type":16,"tag":101,"props":218,"children":220},{"class":103,"line":219},7,[221],{"type":16,"tag":101,"props":222,"children":223},{"style":108},[224],{"type":21,"value":225},"}\n",{"type":16,"tag":17,"props":227,"children":228},{},[229,231,237,239,245,246,252,253,259,261,267,269,275,277,283],{"type":21,"value":230},"Swap ",{"type":16,"tag":24,"props":232,"children":234},{"className":233},[],[235],{"type":21,"value":236},"Glass",{"type":21,"value":238}," for ",{"type":16,"tag":24,"props":240,"children":242},{"className":241},[],[243],{"type":21,"value":244},"Ping",{"type":21,"value":180},{"type":16,"tag":24,"props":247,"children":249},{"className":248},[],[250],{"type":21,"value":251},"Hero",{"type":21,"value":180},{"type":16,"tag":24,"props":254,"children":256},{"className":255},[],[257],{"type":21,"value":258},"Submarine",{"type":21,"value":260},", or anything in ",{"type":16,"tag":24,"props":262,"children":264},{"className":263},[],[265],{"type":21,"value":266},"/System/Library/Sounds/",{"type":21,"value":268},". Run ",{"type":16,"tag":24,"props":270,"children":272},{"className":271},[],[273],{"type":21,"value":274},"ls /System/Library/Sounds/",{"type":21,"value":276}," to hear your options, and ",{"type":16,"tag":24,"props":278,"children":280},{"className":279},[],[281],{"type":21,"value":282},"afplay -v 0.4 …",{"type":21,"value":284}," if the default is too loud for an open office.",{"type":16,"tag":71,"props":286,"children":288},{"id":287},"linux",[289],{"type":21,"value":290},"Linux",{"type":16,"tag":17,"props":292,"children":293},{},[294,296,302],{"type":21,"value":295},"Use ",{"type":16,"tag":24,"props":297,"children":299},{"className":298},[],[300],{"type":21,"value":301},"paplay",{"type":21,"value":303}," (PulseAudio/PipeWire) with any sound file:",{"type":16,"tag":91,"props":305,"children":307},{"className":93,"code":306,"language":95,"meta":7,"style":7},"{\n  \"hooks\": {\n    \"Stop\": [\n      { \"hooks\": [{ \"type\": \"command\", \"command\": \"paplay /usr/share/sounds/freedesktop/stereo/complete.oga\" }] }\n    ]\n  }\n}\n",[308],{"type":16,"tag":24,"props":309,"children":310},{"__ignoreMap":7},[311,318,329,340,388,395,402],{"type":16,"tag":101,"props":312,"children":313},{"class":103,"line":104},[314],{"type":16,"tag":101,"props":315,"children":316},{"style":108},[317],{"type":21,"value":111},{"type":16,"tag":101,"props":319,"children":320},{"class":103,"line":114},[321,325],{"type":16,"tag":101,"props":322,"children":323},{"style":118},[324],{"type":21,"value":121},{"type":16,"tag":101,"props":326,"children":327},{"style":108},[328],{"type":21,"value":126},{"type":16,"tag":101,"props":330,"children":331},{"class":103,"line":129},[332,336],{"type":16,"tag":101,"props":333,"children":334},{"style":118},[335],{"type":21,"value":135},{"type":16,"tag":101,"props":337,"children":338},{"style":108},[339],{"type":21,"value":140},{"type":16,"tag":101,"props":341,"children":342},{"class":103,"line":143},[343,347,351,355,359,363,367,371,375,379,384],{"type":16,"tag":101,"props":344,"children":345},{"style":108},[346],{"type":21,"value":149},{"type":16,"tag":101,"props":348,"children":349},{"style":118},[350],{"type":21,"value":154},{"type":16,"tag":101,"props":352,"children":353},{"style":108},[354],{"type":21,"value":159},{"type":16,"tag":101,"props":356,"children":357},{"style":118},[358],{"type":21,"value":164},{"type":16,"tag":101,"props":360,"children":361},{"style":108},[362],{"type":21,"value":169},{"type":16,"tag":101,"props":364,"children":365},{"style":172},[366],{"type":21,"value":175},{"type":16,"tag":101,"props":368,"children":369},{"style":108},[370],{"type":21,"value":180},{"type":16,"tag":101,"props":372,"children":373},{"style":118},[374],{"type":21,"value":175},{"type":16,"tag":101,"props":376,"children":377},{"style":108},[378],{"type":21,"value":169},{"type":16,"tag":101,"props":380,"children":381},{"style":172},[382],{"type":21,"value":383},"\"paplay /usr/share/sounds/freedesktop/stereo/complete.oga\"",{"type":16,"tag":101,"props":385,"children":386},{"style":108},[387],{"type":21,"value":198},{"type":16,"tag":101,"props":389,"children":390},{"class":103,"line":201},[391],{"type":16,"tag":101,"props":392,"children":393},{"style":108},[394],{"type":21,"value":207},{"type":16,"tag":101,"props":396,"children":397},{"class":103,"line":210},[398],{"type":16,"tag":101,"props":399,"children":400},{"style":108},[401],{"type":21,"value":216},{"type":16,"tag":101,"props":403,"children":404},{"class":103,"line":219},[405],{"type":16,"tag":101,"props":406,"children":407},{"style":108},[408],{"type":21,"value":225},{"type":16,"tag":17,"props":410,"children":411},{},[412,414,420,422,428,429,435,436,442,444,450,452,458,460,466],{"type":21,"value":413},"The ",{"type":16,"tag":24,"props":415,"children":417},{"className":416},[],[418],{"type":21,"value":419},"freedesktop",{"type":21,"value":421}," theme ships ",{"type":16,"tag":24,"props":423,"children":425},{"className":424},[],[426],{"type":21,"value":427},"complete.oga",{"type":21,"value":180},{"type":16,"tag":24,"props":430,"children":432},{"className":431},[],[433],{"type":21,"value":434},"bell.oga",{"type":21,"value":180},{"type":16,"tag":24,"props":437,"children":439},{"className":438},[],[440],{"type":21,"value":441},"message.oga",{"type":21,"value":443}," and a few more, so you have a small palette without downloading anything. No PulseAudio? ",{"type":16,"tag":24,"props":445,"children":447},{"className":446},[],[448],{"type":21,"value":449},"aplay",{"type":21,"value":451}," handles WAV files, and ",{"type":16,"tag":24,"props":453,"children":455},{"className":454},[],[456],{"type":21,"value":457},"ffplay -nodisp -autoexit",{"type":21,"value":459}," plays anything at all. No sound daemon at all? The terminal bell always works: ",{"type":16,"tag":24,"props":461,"children":463},{"className":462},[],[464],{"type":21,"value":465},"printf '\\\\a'",{"type":21,"value":467},".",{"type":16,"tag":71,"props":469,"children":471},{"id":470},"windows",[472],{"type":21,"value":473},"Windows",{"type":16,"tag":17,"props":475,"children":476},{},[477],{"type":21,"value":478},"PowerShell can beep or play a system sound:",{"type":16,"tag":91,"props":480,"children":482},{"className":93,"code":481,"language":95,"meta":7,"style":7},"{\n  \"hooks\": {\n    \"Stop\": [\n      { \"hooks\": [{ \"type\": \"command\", \"command\": \"powershell -c \\\"(New-Object Media.SoundPlayer 'C:\\\\Windows\\\\Media\\\\notify.wav').PlaySync()\\\"\" }] }\n    ]\n  }\n}\n",[483],{"type":16,"tag":24,"props":484,"children":485},{"__ignoreMap":7},[486,493,504,515,609,616,623],{"type":16,"tag":101,"props":487,"children":488},{"class":103,"line":104},[489],{"type":16,"tag":101,"props":490,"children":491},{"style":108},[492],{"type":21,"value":111},{"type":16,"tag":101,"props":494,"children":495},{"class":103,"line":114},[496,500],{"type":16,"tag":101,"props":497,"children":498},{"style":118},[499],{"type":21,"value":121},{"type":16,"tag":101,"props":501,"children":502},{"style":108},[503],{"type":21,"value":126},{"type":16,"tag":101,"props":505,"children":506},{"class":103,"line":129},[507,511],{"type":16,"tag":101,"props":508,"children":509},{"style":118},[510],{"type":21,"value":135},{"type":16,"tag":101,"props":512,"children":513},{"style":108},[514],{"type":21,"value":140},{"type":16,"tag":101,"props":516,"children":517},{"class":103,"line":143},[518,522,526,530,534,538,542,546,550,554,559,564,569,574,578,582,587,591,596,600,605],{"type":16,"tag":101,"props":519,"children":520},{"style":108},[521],{"type":21,"value":149},{"type":16,"tag":101,"props":523,"children":524},{"style":118},[525],{"type":21,"value":154},{"type":16,"tag":101,"props":527,"children":528},{"style":108},[529],{"type":21,"value":159},{"type":16,"tag":101,"props":531,"children":532},{"style":118},[533],{"type":21,"value":164},{"type":16,"tag":101,"props":535,"children":536},{"style":108},[537],{"type":21,"value":169},{"type":16,"tag":101,"props":539,"children":540},{"style":172},[541],{"type":21,"value":175},{"type":16,"tag":101,"props":543,"children":544},{"style":108},[545],{"type":21,"value":180},{"type":16,"tag":101,"props":547,"children":548},{"style":118},[549],{"type":21,"value":175},{"type":16,"tag":101,"props":551,"children":552},{"style":108},[553],{"type":21,"value":169},{"type":16,"tag":101,"props":555,"children":556},{"style":172},[557],{"type":21,"value":558},"\"powershell -c ",{"type":16,"tag":101,"props":560,"children":561},{"style":118},[562],{"type":21,"value":563},"\\\"",{"type":16,"tag":101,"props":565,"children":566},{"style":172},[567],{"type":21,"value":568},"(New-Object Media.SoundPlayer 'C:",{"type":16,"tag":101,"props":570,"children":571},{"style":118},[572],{"type":21,"value":573},"\\\\",{"type":16,"tag":101,"props":575,"children":576},{"style":172},[577],{"type":21,"value":473},{"type":16,"tag":101,"props":579,"children":580},{"style":118},[581],{"type":21,"value":573},{"type":16,"tag":101,"props":583,"children":584},{"style":172},[585],{"type":21,"value":586},"Media",{"type":16,"tag":101,"props":588,"children":589},{"style":118},[590],{"type":21,"value":573},{"type":16,"tag":101,"props":592,"children":593},{"style":172},[594],{"type":21,"value":595},"notify.wav').PlaySync()",{"type":16,"tag":101,"props":597,"children":598},{"style":118},[599],{"type":21,"value":563},{"type":16,"tag":101,"props":601,"children":602},{"style":172},[603],{"type":21,"value":604},"\"",{"type":16,"tag":101,"props":606,"children":607},{"style":108},[608],{"type":21,"value":198},{"type":16,"tag":101,"props":610,"children":611},{"class":103,"line":201},[612],{"type":16,"tag":101,"props":613,"children":614},{"style":108},[615],{"type":21,"value":207},{"type":16,"tag":101,"props":617,"children":618},{"class":103,"line":210},[619],{"type":16,"tag":101,"props":620,"children":621},{"style":108},[622],{"type":21,"value":216},{"type":16,"tag":101,"props":624,"children":625},{"class":103,"line":219},[626],{"type":16,"tag":101,"props":627,"children":628},{"style":108},[629],{"type":21,"value":225},{"type":16,"tag":17,"props":631,"children":632},{},[633,635,641,643,649],{"type":21,"value":634},"Keep the double quotes around the PowerShell expression. Without them the parentheses are read by whichever shell Claude Code handed your command to, and in Git Bash a ",{"type":16,"tag":24,"props":636,"children":638},{"className":637},[],[639],{"type":21,"value":640},"(",{"type":21,"value":642}," in that position is a syntax error, so the hook never runs. More on that in ",{"type":16,"tag":38,"props":644,"children":646},{"href":645},"/guides/claude-code-hooks-windows",[647],{"type":21,"value":648},"which shell runs your hooks on Windows",{"type":21,"value":467},{"type":16,"tag":17,"props":651,"children":652},{},[653,659,661,667],{"type":16,"tag":24,"props":654,"children":656},{"className":655},[],[657],{"type":21,"value":658},"C:\\Windows\\Media\\",{"type":21,"value":660}," holds the rest of the system sounds. If you run Claude Code inside WSL, call the Windows binary from the Linux side with ",{"type":16,"tag":24,"props":662,"children":664},{"className":663},[],[665],{"type":21,"value":666},"powershell.exe -c …",{"type":21,"value":668},", since a Linux audio player has no speaker to reach without WSLg.",{"type":16,"tag":71,"props":670,"children":672},{"id":671},"different-sounds-for-different-events",[673],{"type":21,"value":674},"Different sounds for different events",{"type":16,"tag":17,"props":676,"children":677},{},[678,680,686,688,693],{"type":21,"value":679},"Because each event is a separate hook, you can give \"needs you\" and \"done\" distinct sounds: an urgent one when a session is blocked on you (",{"type":16,"tag":24,"props":681,"children":683},{"className":682},[],[684],{"type":21,"value":685},"Notification",{"type":21,"value":687},"), a gentle one when it finishes (",{"type":16,"tag":24,"props":689,"children":691},{"className":690},[],[692],{"type":21,"value":29},{"type":21,"value":694},"):",{"type":16,"tag":91,"props":696,"children":698},{"className":93,"code":697,"language":95,"meta":7,"style":7},"{\n  \"hooks\": {\n    \"Notification\": [\n      { \"hooks\": [{ \"type\": \"command\", \"command\": \"afplay /System/Library/Sounds/Ping.aiff\" }] }\n    ],\n    \"Stop\": [\n      { \"hooks\": [{ \"type\": \"command\", \"command\": \"afplay /System/Library/Sounds/Glass.aiff\" }] }\n    ]\n  }\n}\n",[699],{"type":16,"tag":24,"props":700,"children":701},{"__ignoreMap":7},[702,709,720,732,780,788,799,846,854,862],{"type":16,"tag":101,"props":703,"children":704},{"class":103,"line":104},[705],{"type":16,"tag":101,"props":706,"children":707},{"style":108},[708],{"type":21,"value":111},{"type":16,"tag":101,"props":710,"children":711},{"class":103,"line":114},[712,716],{"type":16,"tag":101,"props":713,"children":714},{"style":118},[715],{"type":21,"value":121},{"type":16,"tag":101,"props":717,"children":718},{"style":108},[719],{"type":21,"value":126},{"type":16,"tag":101,"props":721,"children":722},{"class":103,"line":129},[723,728],{"type":16,"tag":101,"props":724,"children":725},{"style":118},[726],{"type":21,"value":727},"    \"Notification\"",{"type":16,"tag":101,"props":729,"children":730},{"style":108},[731],{"type":21,"value":140},{"type":16,"tag":101,"props":733,"children":734},{"class":103,"line":143},[735,739,743,747,751,755,759,763,767,771,776],{"type":16,"tag":101,"props":736,"children":737},{"style":108},[738],{"type":21,"value":149},{"type":16,"tag":101,"props":740,"children":741},{"style":118},[742],{"type":21,"value":154},{"type":16,"tag":101,"props":744,"children":745},{"style":108},[746],{"type":21,"value":159},{"type":16,"tag":101,"props":748,"children":749},{"style":118},[750],{"type":21,"value":164},{"type":16,"tag":101,"props":752,"children":753},{"style":108},[754],{"type":21,"value":169},{"type":16,"tag":101,"props":756,"children":757},{"style":172},[758],{"type":21,"value":175},{"type":16,"tag":101,"props":760,"children":761},{"style":108},[762],{"type":21,"value":180},{"type":16,"tag":101,"props":764,"children":765},{"style":118},[766],{"type":21,"value":175},{"type":16,"tag":101,"props":768,"children":769},{"style":108},[770],{"type":21,"value":169},{"type":16,"tag":101,"props":772,"children":773},{"style":172},[774],{"type":21,"value":775},"\"afplay /System/Library/Sounds/Ping.aiff\"",{"type":16,"tag":101,"props":777,"children":778},{"style":108},[779],{"type":21,"value":198},{"type":16,"tag":101,"props":781,"children":782},{"class":103,"line":201},[783],{"type":16,"tag":101,"props":784,"children":785},{"style":108},[786],{"type":21,"value":787},"    ],\n",{"type":16,"tag":101,"props":789,"children":790},{"class":103,"line":210},[791,795],{"type":16,"tag":101,"props":792,"children":793},{"style":118},[794],{"type":21,"value":135},{"type":16,"tag":101,"props":796,"children":797},{"style":108},[798],{"type":21,"value":140},{"type":16,"tag":101,"props":800,"children":801},{"class":103,"line":219},[802,806,810,814,818,822,826,830,834,838,842],{"type":16,"tag":101,"props":803,"children":804},{"style":108},[805],{"type":21,"value":149},{"type":16,"tag":101,"props":807,"children":808},{"style":118},[809],{"type":21,"value":154},{"type":16,"tag":101,"props":811,"children":812},{"style":108},[813],{"type":21,"value":159},{"type":16,"tag":101,"props":815,"children":816},{"style":118},[817],{"type":21,"value":164},{"type":16,"tag":101,"props":819,"children":820},{"style":108},[821],{"type":21,"value":169},{"type":16,"tag":101,"props":823,"children":824},{"style":172},[825],{"type":21,"value":175},{"type":16,"tag":101,"props":827,"children":828},{"style":108},[829],{"type":21,"value":180},{"type":16,"tag":101,"props":831,"children":832},{"style":118},[833],{"type":21,"value":175},{"type":16,"tag":101,"props":835,"children":836},{"style":108},[837],{"type":21,"value":169},{"type":16,"tag":101,"props":839,"children":840},{"style":172},[841],{"type":21,"value":193},{"type":16,"tag":101,"props":843,"children":844},{"style":108},[845],{"type":21,"value":198},{"type":16,"tag":101,"props":847,"children":849},{"class":103,"line":848},8,[850],{"type":16,"tag":101,"props":851,"children":852},{"style":108},[853],{"type":21,"value":207},{"type":16,"tag":101,"props":855,"children":857},{"class":103,"line":856},9,[858],{"type":16,"tag":101,"props":859,"children":860},{"style":108},[861],{"type":21,"value":216},{"type":16,"tag":101,"props":863,"children":865},{"class":103,"line":864},10,[866],{"type":16,"tag":101,"props":867,"children":868},{"style":108},[869],{"type":21,"value":225},{"type":16,"tag":17,"props":871,"children":872},{},[873],{"type":21,"value":874},"Two sounds is about the limit of what you can tell apart without thinking. Past that, you are learning a language rather than getting a cue.",{"type":16,"tag":71,"props":876,"children":878},{"id":877},"a-different-sound-per-project",[879],{"type":21,"value":880},"A different sound per project",{"type":16,"tag":17,"props":882,"children":883},{},[884,886,892,894,899,901,907,909,915,917,922],{"type":21,"value":885},"If you run several repositories, put the sound in the ",{"type":16,"tag":887,"props":888,"children":889},"strong",{},[890],{"type":21,"value":891},"project",{"type":21,"value":893}," settings file rather than your user one, and each gets its own chime. ",{"type":16,"tag":24,"props":895,"children":897},{"className":896},[],[898],{"type":21,"value":67},{"type":21,"value":900}," in the API repo can play ",{"type":16,"tag":24,"props":902,"children":904},{"className":903},[],[905],{"type":21,"value":906},"Submarine.aiff",{"type":21,"value":908}," while the frontend plays ",{"type":16,"tag":24,"props":910,"children":912},{"className":911},[],[913],{"type":21,"value":914},"Hero.aiff",{"type":21,"value":916},", and the same hook block layers cleanly on top of whatever you have in ",{"type":16,"tag":24,"props":918,"children":920},{"className":919},[],[921],{"type":21,"value":59},{"type":21,"value":467},{"type":16,"tag":71,"props":924,"children":926},{"id":925},"do-not-chime-on-every-little-turn",[927],{"type":21,"value":928},"Do not chime on every little turn",{"type":16,"tag":17,"props":930,"children":931},{},[932,934,940,942,947],{"type":21,"value":933},"A sound after a three second turn is noise. Gate it on how long the turn actually took by stamping the start on ",{"type":16,"tag":24,"props":935,"children":937},{"className":936},[],[938],{"type":21,"value":939},"UserPromptSubmit",{"type":21,"value":941}," and checking it on ",{"type":16,"tag":24,"props":943,"children":945},{"className":944},[],[946],{"type":21,"value":29},{"type":21,"value":89},{"type":16,"tag":91,"props":949,"children":951},{"className":93,"code":950,"language":95,"meta":7,"style":7},"{\n  \"hooks\": {\n    \"UserPromptSubmit\": [\n      { \"hooks\": [{ \"type\": \"command\", \"command\": \"date +%s > /tmp/claude-start\" }] }\n    ],\n    \"Stop\": [\n      { \"hooks\": [{ \"type\": \"command\", \"command\": \"[ $(( $(date +%s) - $(cat /tmp/claude-start) )) -gt 45 ] && afplay /System/Library/Sounds/Glass.aiff\" }] }\n    ]\n  }\n}\n",[952],{"type":16,"tag":24,"props":953,"children":954},{"__ignoreMap":7},[955,962,973,985,1033,1040,1051,1099,1106,1113],{"type":16,"tag":101,"props":956,"children":957},{"class":103,"line":104},[958],{"type":16,"tag":101,"props":959,"children":960},{"style":108},[961],{"type":21,"value":111},{"type":16,"tag":101,"props":963,"children":964},{"class":103,"line":114},[965,969],{"type":16,"tag":101,"props":966,"children":967},{"style":118},[968],{"type":21,"value":121},{"type":16,"tag":101,"props":970,"children":971},{"style":108},[972],{"type":21,"value":126},{"type":16,"tag":101,"props":974,"children":975},{"class":103,"line":129},[976,981],{"type":16,"tag":101,"props":977,"children":978},{"style":118},[979],{"type":21,"value":980},"    \"UserPromptSubmit\"",{"type":16,"tag":101,"props":982,"children":983},{"style":108},[984],{"type":21,"value":140},{"type":16,"tag":101,"props":986,"children":987},{"class":103,"line":143},[988,992,996,1000,1004,1008,1012,1016,1020,1024,1029],{"type":16,"tag":101,"props":989,"children":990},{"style":108},[991],{"type":21,"value":149},{"type":16,"tag":101,"props":993,"children":994},{"style":118},[995],{"type":21,"value":154},{"type":16,"tag":101,"props":997,"children":998},{"style":108},[999],{"type":21,"value":159},{"type":16,"tag":101,"props":1001,"children":1002},{"style":118},[1003],{"type":21,"value":164},{"type":16,"tag":101,"props":1005,"children":1006},{"style":108},[1007],{"type":21,"value":169},{"type":16,"tag":101,"props":1009,"children":1010},{"style":172},[1011],{"type":21,"value":175},{"type":16,"tag":101,"props":1013,"children":1014},{"style":108},[1015],{"type":21,"value":180},{"type":16,"tag":101,"props":1017,"children":1018},{"style":118},[1019],{"type":21,"value":175},{"type":16,"tag":101,"props":1021,"children":1022},{"style":108},[1023],{"type":21,"value":169},{"type":16,"tag":101,"props":1025,"children":1026},{"style":172},[1027],{"type":21,"value":1028},"\"date +%s > /tmp/claude-start\"",{"type":16,"tag":101,"props":1030,"children":1031},{"style":108},[1032],{"type":21,"value":198},{"type":16,"tag":101,"props":1034,"children":1035},{"class":103,"line":201},[1036],{"type":16,"tag":101,"props":1037,"children":1038},{"style":108},[1039],{"type":21,"value":787},{"type":16,"tag":101,"props":1041,"children":1042},{"class":103,"line":210},[1043,1047],{"type":16,"tag":101,"props":1044,"children":1045},{"style":118},[1046],{"type":21,"value":135},{"type":16,"tag":101,"props":1048,"children":1049},{"style":108},[1050],{"type":21,"value":140},{"type":16,"tag":101,"props":1052,"children":1053},{"class":103,"line":219},[1054,1058,1062,1066,1070,1074,1078,1082,1086,1090,1095],{"type":16,"tag":101,"props":1055,"children":1056},{"style":108},[1057],{"type":21,"value":149},{"type":16,"tag":101,"props":1059,"children":1060},{"style":118},[1061],{"type":21,"value":154},{"type":16,"tag":101,"props":1063,"children":1064},{"style":108},[1065],{"type":21,"value":159},{"type":16,"tag":101,"props":1067,"children":1068},{"style":118},[1069],{"type":21,"value":164},{"type":16,"tag":101,"props":1071,"children":1072},{"style":108},[1073],{"type":21,"value":169},{"type":16,"tag":101,"props":1075,"children":1076},{"style":172},[1077],{"type":21,"value":175},{"type":16,"tag":101,"props":1079,"children":1080},{"style":108},[1081],{"type":21,"value":180},{"type":16,"tag":101,"props":1083,"children":1084},{"style":118},[1085],{"type":21,"value":175},{"type":16,"tag":101,"props":1087,"children":1088},{"style":108},[1089],{"type":21,"value":169},{"type":16,"tag":101,"props":1091,"children":1092},{"style":172},[1093],{"type":21,"value":1094},"\"[ $(( $(date +%s) - $(cat /tmp/claude-start) )) -gt 45 ] && afplay /System/Library/Sounds/Glass.aiff\"",{"type":16,"tag":101,"props":1096,"children":1097},{"style":108},[1098],{"type":21,"value":198},{"type":16,"tag":101,"props":1100,"children":1101},{"class":103,"line":848},[1102],{"type":16,"tag":101,"props":1103,"children":1104},{"style":108},[1105],{"type":21,"value":207},{"type":16,"tag":101,"props":1107,"children":1108},{"class":103,"line":856},[1109],{"type":16,"tag":101,"props":1110,"children":1111},{"style":108},[1112],{"type":21,"value":216},{"type":16,"tag":101,"props":1114,"children":1115},{"class":103,"line":864},[1116],{"type":16,"tag":101,"props":1117,"children":1118},{"style":108},[1119],{"type":21,"value":225},{"type":16,"tag":17,"props":1121,"children":1122},{},[1123,1125,1131,1133,1139],{"type":21,"value":1124},"Now only the runs long enough for you to have wandered off make a sound. If you run several sessions at once, write the stamp to a per-session file using the ",{"type":16,"tag":24,"props":1126,"children":1128},{"className":1127},[],[1129],{"type":21,"value":1130},"session_id",{"type":21,"value":1132}," from the payload instead of a shared ",{"type":16,"tag":24,"props":1134,"children":1136},{"className":1135},[],[1137],{"type":21,"value":1138},"/tmp",{"type":21,"value":1140}," path.",{"type":16,"tag":71,"props":1142,"children":1144},{"id":1143},"pick-the-right-event-not-all-of-them",[1145],{"type":21,"value":1146},"Pick the right event, not all of them",{"type":16,"tag":17,"props":1148,"children":1149},{},[1150,1155,1157,1163,1165,1171,1173,1178,1180,1185],{"type":16,"tag":24,"props":1151,"children":1153},{"className":1152},[],[1154],{"type":21,"value":29},{"type":21,"value":1156}," is the event you want for \"it is done\". Two neighbours look tempting and are traps. ",{"type":16,"tag":24,"props":1158,"children":1160},{"className":1159},[],[1161],{"type":21,"value":1162},"SubagentStop",{"type":21,"value":1164}," fires once per subagent, so a single fan-out can chime eight times in twenty seconds. ",{"type":16,"tag":24,"props":1166,"children":1168},{"className":1167},[],[1169],{"type":21,"value":1170},"SessionEnd",{"type":21,"value":1172}," fires when you close the session, which you already know about because you did it. If you only wire one hook, wire ",{"type":16,"tag":24,"props":1174,"children":1176},{"className":1175},[],[1177],{"type":21,"value":29},{"type":21,"value":1179},"; if you wire two, add ",{"type":16,"tag":24,"props":1181,"children":1183},{"className":1182},[],[1184],{"type":21,"value":685},{"type":21,"value":1186},", because being blocked is the thing genuinely worth interrupting you for.",{"type":16,"tag":71,"props":1188,"children":1190},{"id":1189},"let-your-terminal-do-the-work",[1191],{"type":21,"value":1192},"Let your terminal do the work",{"type":16,"tag":17,"props":1194,"children":1195},{},[1196],{"type":21,"value":1197},"If you live in tmux or a terminal with triggers, the bell is more useful than a sound file, because your multiplexer can act on it. Ring it from the hook:",{"type":16,"tag":91,"props":1199,"children":1201},{"className":93,"code":1200,"language":95,"meta":7,"style":7},"{\n  \"hooks\": {\n    \"Stop\": [\n      { \"hooks\": [{ \"type\": \"command\", \"command\": \"printf '\\\\a' > /dev/tty\" }] }\n    ]\n  }\n}\n",[1202],{"type":16,"tag":24,"props":1203,"children":1204},{"__ignoreMap":7},[1205,1212,1223,1234,1291,1298,1305],{"type":16,"tag":101,"props":1206,"children":1207},{"class":103,"line":104},[1208],{"type":16,"tag":101,"props":1209,"children":1210},{"style":108},[1211],{"type":21,"value":111},{"type":16,"tag":101,"props":1213,"children":1214},{"class":103,"line":114},[1215,1219],{"type":16,"tag":101,"props":1216,"children":1217},{"style":118},[1218],{"type":21,"value":121},{"type":16,"tag":101,"props":1220,"children":1221},{"style":108},[1222],{"type":21,"value":126},{"type":16,"tag":101,"props":1224,"children":1225},{"class":103,"line":129},[1226,1230],{"type":16,"tag":101,"props":1227,"children":1228},{"style":118},[1229],{"type":21,"value":135},{"type":16,"tag":101,"props":1231,"children":1232},{"style":108},[1233],{"type":21,"value":140},{"type":16,"tag":101,"props":1235,"children":1236},{"class":103,"line":143},[1237,1241,1245,1249,1253,1257,1261,1265,1269,1273,1278,1282,1287],{"type":16,"tag":101,"props":1238,"children":1239},{"style":108},[1240],{"type":21,"value":149},{"type":16,"tag":101,"props":1242,"children":1243},{"style":118},[1244],{"type":21,"value":154},{"type":16,"tag":101,"props":1246,"children":1247},{"style":108},[1248],{"type":21,"value":159},{"type":16,"tag":101,"props":1250,"children":1251},{"style":118},[1252],{"type":21,"value":164},{"type":16,"tag":101,"props":1254,"children":1255},{"style":108},[1256],{"type":21,"value":169},{"type":16,"tag":101,"props":1258,"children":1259},{"style":172},[1260],{"type":21,"value":175},{"type":16,"tag":101,"props":1262,"children":1263},{"style":108},[1264],{"type":21,"value":180},{"type":16,"tag":101,"props":1266,"children":1267},{"style":118},[1268],{"type":21,"value":175},{"type":16,"tag":101,"props":1270,"children":1271},{"style":108},[1272],{"type":21,"value":169},{"type":16,"tag":101,"props":1274,"children":1275},{"style":172},[1276],{"type":21,"value":1277},"\"printf '",{"type":16,"tag":101,"props":1279,"children":1280},{"style":118},[1281],{"type":21,"value":573},{"type":16,"tag":101,"props":1283,"children":1284},{"style":172},[1285],{"type":21,"value":1286},"a' > /dev/tty\"",{"type":16,"tag":101,"props":1288,"children":1289},{"style":108},[1290],{"type":21,"value":198},{"type":16,"tag":101,"props":1292,"children":1293},{"class":103,"line":201},[1294],{"type":16,"tag":101,"props":1295,"children":1296},{"style":108},[1297],{"type":21,"value":207},{"type":16,"tag":101,"props":1299,"children":1300},{"class":103,"line":210},[1301],{"type":16,"tag":101,"props":1302,"children":1303},{"style":108},[1304],{"type":21,"value":216},{"type":16,"tag":101,"props":1306,"children":1307},{"class":103,"line":219},[1308],{"type":16,"tag":101,"props":1309,"children":1310},{"style":108},[1311],{"type":21,"value":225},{"type":16,"tag":17,"props":1313,"children":1314},{},[1315,1317,1323,1325,1330],{"type":21,"value":1316},"Then let tmux flag the window it came from, so the sound tells you ",{"type":16,"tag":1318,"props":1319,"children":1320},"em",{},[1321],{"type":21,"value":1322},"where",{"type":21,"value":1324}," as well as ",{"type":16,"tag":1318,"props":1326,"children":1327},{},[1328],{"type":21,"value":1329},"what",{"type":21,"value":89},{"type":16,"tag":91,"props":1332,"children":1336},{"className":1333,"code":1334,"language":1335,"meta":7,"style":7},"language-bash shiki shiki-themes github-light github-dark","# ~/.tmux.conf\nset -g monitor-bell on\nset -g visual-bell both\n","bash",[1337],{"type":16,"tag":24,"props":1338,"children":1339},{"__ignoreMap":7},[1340,1349,1372],{"type":16,"tag":101,"props":1341,"children":1342},{"class":103,"line":104},[1343],{"type":16,"tag":101,"props":1344,"children":1346},{"style":1345},"--shiki-default:#6A737D;--shiki-dark:#6A737D",[1347],{"type":21,"value":1348},"# ~/.tmux.conf\n",{"type":16,"tag":101,"props":1350,"children":1351},{"class":103,"line":114},[1352,1357,1362,1367],{"type":16,"tag":101,"props":1353,"children":1354},{"style":118},[1355],{"type":21,"value":1356},"set",{"type":16,"tag":101,"props":1358,"children":1359},{"style":118},[1360],{"type":21,"value":1361}," -g",{"type":16,"tag":101,"props":1363,"children":1364},{"style":172},[1365],{"type":21,"value":1366}," monitor-bell",{"type":16,"tag":101,"props":1368,"children":1369},{"style":172},[1370],{"type":21,"value":1371}," on\n",{"type":16,"tag":101,"props":1373,"children":1374},{"class":103,"line":129},[1375,1379,1383,1388],{"type":16,"tag":101,"props":1376,"children":1377},{"style":118},[1378],{"type":21,"value":1356},{"type":16,"tag":101,"props":1380,"children":1381},{"style":118},[1382],{"type":21,"value":1361},{"type":16,"tag":101,"props":1384,"children":1385},{"style":172},[1386],{"type":21,"value":1387}," visual-bell",{"type":16,"tag":101,"props":1389,"children":1390},{"style":172},[1391],{"type":21,"value":1392}," both\n",{"type":16,"tag":17,"props":1394,"children":1395},{},[1396],{"type":21,"value":1397},"Now the status bar highlights the window whose session finished, which is the piece a plain chime never gives you.",{"type":16,"tag":71,"props":1399,"children":1401},{"id":1400},"why-nothing-plays",[1402],{"type":21,"value":1403},"Why nothing plays",{"type":16,"tag":17,"props":1405,"children":1406},{},[1407,1409,1415,1417,1423],{"type":21,"value":1408},"Three usual suspects. Hooks are snapshotted when a session starts, so a hook added mid-session does nothing until you restart Claude Code or review it from ",{"type":16,"tag":24,"props":1410,"children":1412},{"className":1411},[],[1413],{"type":21,"value":1414},"/hooks",{"type":21,"value":1416},". Hooks also run without your interactive shell setup, so use absolute paths to both the player and the sound file. And on a remote or SSH session there is simply no audio device to reach: run ",{"type":16,"tag":24,"props":1418,"children":1420},{"className":1419},[],[1421],{"type":21,"value":1422},"claude --debug",{"type":21,"value":1424}," and you will see the hook fire and the player fail.",{"type":16,"tag":71,"props":1426,"children":1428},{"id":1427},"when-a-sound-is-not-enough",[1429],{"type":21,"value":1430},"When a sound is not enough",{"type":16,"tag":17,"props":1432,"children":1433},{},[1434,1436,1441,1443,1448,1450,1454,1456,1461],{"type":21,"value":1435},"A sound tells you ",{"type":16,"tag":1318,"props":1437,"children":1438},{},[1439],{"type":21,"value":1440},"something",{"type":21,"value":1442}," happened; it does not tell you ",{"type":16,"tag":1318,"props":1444,"children":1445},{},[1446],{"type":21,"value":1447},"which",{"type":21,"value":1449}," session, or ",{"type":16,"tag":1318,"props":1451,"children":1452},{},[1453],{"type":21,"value":1329},{"type":21,"value":1455},". With one agent that is fine. With several running at once, a chime just sends you hunting through terminals to find the one that finished, or the one still waiting on you. Add ",{"type":16,"tag":24,"props":1457,"children":1459},{"className":1458},[],[1460],{"type":21,"value":1162},{"type":21,"value":1462}," to the mix and a busy run can chime a dozen times without ever being done.",{"type":16,"tag":17,"props":1464,"children":1465},{},[1466,1472],{"type":16,"tag":38,"props":1467,"children":1469},{"href":1468},"/",[1470],{"type":21,"value":1471},"Blooby",{"type":21,"value":1473}," uses the very same events, but shows them: each Claude Code session gets its own mascot that celebrates when it finishes and looks up when it needs you, so you glance instead of guess. No sound files, no config to maintain.",{"type":16,"tag":1475,"props":1476,"children":1477},"style",{},[1478],{"type":21,"value":1479},"html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":7,"searchDepth":114,"depth":114,"links":1481},[1482,1483,1484,1485,1486,1487,1488,1489,1490,1491],{"id":73,"depth":114,"text":76},{"id":287,"depth":114,"text":290},{"id":470,"depth":114,"text":473},{"id":671,"depth":114,"text":674},{"id":877,"depth":114,"text":880},{"id":925,"depth":114,"text":928},{"id":1143,"depth":114,"text":1146},{"id":1189,"depth":114,"text":1192},{"id":1400,"depth":114,"text":1403},{"id":1427,"depth":114,"text":1430},"markdown","content:guides:claude-code-sound-when-done.md","content","guides/claude-code-sound-when-done.md","guides/claude-code-sound-when-done","md",1]