[{"data":1,"prerenderedAt":1459},["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":1453,"_id":1454,"_source":1455,"_file":1456,"_stem":1457,"_extension":1458},"/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":1441},"root",[15,32,70,77,90,226,285,291,304,409,468,474,479,611,630,636,656,831,836,842,884,890,909,1081,1102,1108,1148,1154,1159,1273,1292,1354,1359,1365,1386,1392,1424,1435],{"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,590,597,604],{"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,568,572,577,581,586],{"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 (New-Object Media.SoundPlayer '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":473},{"type":16,"tag":101,"props":569,"children":570},{"style":118},[571],{"type":21,"value":563},{"type":16,"tag":101,"props":573,"children":574},{"style":172},[575],{"type":21,"value":576},"Media",{"type":16,"tag":101,"props":578,"children":579},{"style":118},[580],{"type":21,"value":563},{"type":16,"tag":101,"props":582,"children":583},{"style":172},[584],{"type":21,"value":585},"notify.wav').PlaySync()\"",{"type":16,"tag":101,"props":587,"children":588},{"style":108},[589],{"type":21,"value":198},{"type":16,"tag":101,"props":591,"children":592},{"class":103,"line":201},[593],{"type":16,"tag":101,"props":594,"children":595},{"style":108},[596],{"type":21,"value":207},{"type":16,"tag":101,"props":598,"children":599},{"class":103,"line":210},[600],{"type":16,"tag":101,"props":601,"children":602},{"style":108},[603],{"type":21,"value":216},{"type":16,"tag":101,"props":605,"children":606},{"class":103,"line":219},[607],{"type":16,"tag":101,"props":608,"children":609},{"style":108},[610],{"type":21,"value":225},{"type":16,"tag":17,"props":612,"children":613},{},[614,620,622,628],{"type":16,"tag":24,"props":615,"children":617},{"className":616},[],[618],{"type":21,"value":619},"C:\\Windows\\Media\\",{"type":21,"value":621}," 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":623,"children":625},{"className":624},[],[626],{"type":21,"value":627},"powershell.exe -c …",{"type":21,"value":629},", since a Linux audio player has no speaker to reach without WSLg.",{"type":16,"tag":71,"props":631,"children":633},{"id":632},"different-sounds-for-different-events",[634],{"type":21,"value":635},"Different sounds for different events",{"type":16,"tag":17,"props":637,"children":638},{},[639,641,647,649,654],{"type":21,"value":640},"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":642,"children":644},{"className":643},[],[645],{"type":21,"value":646},"Notification",{"type":21,"value":648},"), a gentle one when it finishes (",{"type":16,"tag":24,"props":650,"children":652},{"className":651},[],[653],{"type":21,"value":29},{"type":21,"value":655},"):",{"type":16,"tag":91,"props":657,"children":659},{"className":93,"code":658,"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",[660],{"type":16,"tag":24,"props":661,"children":662},{"__ignoreMap":7},[663,670,681,693,741,749,760,807,815,823],{"type":16,"tag":101,"props":664,"children":665},{"class":103,"line":104},[666],{"type":16,"tag":101,"props":667,"children":668},{"style":108},[669],{"type":21,"value":111},{"type":16,"tag":101,"props":671,"children":672},{"class":103,"line":114},[673,677],{"type":16,"tag":101,"props":674,"children":675},{"style":118},[676],{"type":21,"value":121},{"type":16,"tag":101,"props":678,"children":679},{"style":108},[680],{"type":21,"value":126},{"type":16,"tag":101,"props":682,"children":683},{"class":103,"line":129},[684,689],{"type":16,"tag":101,"props":685,"children":686},{"style":118},[687],{"type":21,"value":688},"    \"Notification\"",{"type":16,"tag":101,"props":690,"children":691},{"style":108},[692],{"type":21,"value":140},{"type":16,"tag":101,"props":694,"children":695},{"class":103,"line":143},[696,700,704,708,712,716,720,724,728,732,737],{"type":16,"tag":101,"props":697,"children":698},{"style":108},[699],{"type":21,"value":149},{"type":16,"tag":101,"props":701,"children":702},{"style":118},[703],{"type":21,"value":154},{"type":16,"tag":101,"props":705,"children":706},{"style":108},[707],{"type":21,"value":159},{"type":16,"tag":101,"props":709,"children":710},{"style":118},[711],{"type":21,"value":164},{"type":16,"tag":101,"props":713,"children":714},{"style":108},[715],{"type":21,"value":169},{"type":16,"tag":101,"props":717,"children":718},{"style":172},[719],{"type":21,"value":175},{"type":16,"tag":101,"props":721,"children":722},{"style":108},[723],{"type":21,"value":180},{"type":16,"tag":101,"props":725,"children":726},{"style":118},[727],{"type":21,"value":175},{"type":16,"tag":101,"props":729,"children":730},{"style":108},[731],{"type":21,"value":169},{"type":16,"tag":101,"props":733,"children":734},{"style":172},[735],{"type":21,"value":736},"\"afplay /System/Library/Sounds/Ping.aiff\"",{"type":16,"tag":101,"props":738,"children":739},{"style":108},[740],{"type":21,"value":198},{"type":16,"tag":101,"props":742,"children":743},{"class":103,"line":201},[744],{"type":16,"tag":101,"props":745,"children":746},{"style":108},[747],{"type":21,"value":748},"    ],\n",{"type":16,"tag":101,"props":750,"children":751},{"class":103,"line":210},[752,756],{"type":16,"tag":101,"props":753,"children":754},{"style":118},[755],{"type":21,"value":135},{"type":16,"tag":101,"props":757,"children":758},{"style":108},[759],{"type":21,"value":140},{"type":16,"tag":101,"props":761,"children":762},{"class":103,"line":219},[763,767,771,775,779,783,787,791,795,799,803],{"type":16,"tag":101,"props":764,"children":765},{"style":108},[766],{"type":21,"value":149},{"type":16,"tag":101,"props":768,"children":769},{"style":118},[770],{"type":21,"value":154},{"type":16,"tag":101,"props":772,"children":773},{"style":108},[774],{"type":21,"value":159},{"type":16,"tag":101,"props":776,"children":777},{"style":118},[778],{"type":21,"value":164},{"type":16,"tag":101,"props":780,"children":781},{"style":108},[782],{"type":21,"value":169},{"type":16,"tag":101,"props":784,"children":785},{"style":172},[786],{"type":21,"value":175},{"type":16,"tag":101,"props":788,"children":789},{"style":108},[790],{"type":21,"value":180},{"type":16,"tag":101,"props":792,"children":793},{"style":118},[794],{"type":21,"value":175},{"type":16,"tag":101,"props":796,"children":797},{"style":108},[798],{"type":21,"value":169},{"type":16,"tag":101,"props":800,"children":801},{"style":172},[802],{"type":21,"value":193},{"type":16,"tag":101,"props":804,"children":805},{"style":108},[806],{"type":21,"value":198},{"type":16,"tag":101,"props":808,"children":810},{"class":103,"line":809},8,[811],{"type":16,"tag":101,"props":812,"children":813},{"style":108},[814],{"type":21,"value":207},{"type":16,"tag":101,"props":816,"children":818},{"class":103,"line":817},9,[819],{"type":16,"tag":101,"props":820,"children":821},{"style":108},[822],{"type":21,"value":216},{"type":16,"tag":101,"props":824,"children":826},{"class":103,"line":825},10,[827],{"type":16,"tag":101,"props":828,"children":829},{"style":108},[830],{"type":21,"value":225},{"type":16,"tag":17,"props":832,"children":833},{},[834],{"type":21,"value":835},"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":837,"children":839},{"id":838},"a-different-sound-per-project",[840],{"type":21,"value":841},"A different sound per project",{"type":16,"tag":17,"props":843,"children":844},{},[845,847,853,855,860,862,868,870,876,878,883],{"type":21,"value":846},"If you run several repositories, put the sound in the ",{"type":16,"tag":848,"props":849,"children":850},"strong",{},[851],{"type":21,"value":852},"project",{"type":21,"value":854}," settings file rather than your user one, and each gets its own chime. ",{"type":16,"tag":24,"props":856,"children":858},{"className":857},[],[859],{"type":21,"value":67},{"type":21,"value":861}," in the API repo can play ",{"type":16,"tag":24,"props":863,"children":865},{"className":864},[],[866],{"type":21,"value":867},"Submarine.aiff",{"type":21,"value":869}," while the frontend plays ",{"type":16,"tag":24,"props":871,"children":873},{"className":872},[],[874],{"type":21,"value":875},"Hero.aiff",{"type":21,"value":877},", and the same hook block layers cleanly on top of whatever you have in ",{"type":16,"tag":24,"props":879,"children":881},{"className":880},[],[882],{"type":21,"value":59},{"type":21,"value":467},{"type":16,"tag":71,"props":885,"children":887},{"id":886},"do-not-chime-on-every-little-turn",[888],{"type":21,"value":889},"Do not chime on every little turn",{"type":16,"tag":17,"props":891,"children":892},{},[893,895,901,903,908],{"type":21,"value":894},"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":896,"children":898},{"className":897},[],[899],{"type":21,"value":900},"UserPromptSubmit",{"type":21,"value":902}," and checking it on ",{"type":16,"tag":24,"props":904,"children":906},{"className":905},[],[907],{"type":21,"value":29},{"type":21,"value":89},{"type":16,"tag":91,"props":910,"children":912},{"className":93,"code":911,"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",[913],{"type":16,"tag":24,"props":914,"children":915},{"__ignoreMap":7},[916,923,934,946,994,1001,1012,1060,1067,1074],{"type":16,"tag":101,"props":917,"children":918},{"class":103,"line":104},[919],{"type":16,"tag":101,"props":920,"children":921},{"style":108},[922],{"type":21,"value":111},{"type":16,"tag":101,"props":924,"children":925},{"class":103,"line":114},[926,930],{"type":16,"tag":101,"props":927,"children":928},{"style":118},[929],{"type":21,"value":121},{"type":16,"tag":101,"props":931,"children":932},{"style":108},[933],{"type":21,"value":126},{"type":16,"tag":101,"props":935,"children":936},{"class":103,"line":129},[937,942],{"type":16,"tag":101,"props":938,"children":939},{"style":118},[940],{"type":21,"value":941},"    \"UserPromptSubmit\"",{"type":16,"tag":101,"props":943,"children":944},{"style":108},[945],{"type":21,"value":140},{"type":16,"tag":101,"props":947,"children":948},{"class":103,"line":143},[949,953,957,961,965,969,973,977,981,985,990],{"type":16,"tag":101,"props":950,"children":951},{"style":108},[952],{"type":21,"value":149},{"type":16,"tag":101,"props":954,"children":955},{"style":118},[956],{"type":21,"value":154},{"type":16,"tag":101,"props":958,"children":959},{"style":108},[960],{"type":21,"value":159},{"type":16,"tag":101,"props":962,"children":963},{"style":118},[964],{"type":21,"value":164},{"type":16,"tag":101,"props":966,"children":967},{"style":108},[968],{"type":21,"value":169},{"type":16,"tag":101,"props":970,"children":971},{"style":172},[972],{"type":21,"value":175},{"type":16,"tag":101,"props":974,"children":975},{"style":108},[976],{"type":21,"value":180},{"type":16,"tag":101,"props":978,"children":979},{"style":118},[980],{"type":21,"value":175},{"type":16,"tag":101,"props":982,"children":983},{"style":108},[984],{"type":21,"value":169},{"type":16,"tag":101,"props":986,"children":987},{"style":172},[988],{"type":21,"value":989},"\"date +%s > /tmp/claude-start\"",{"type":16,"tag":101,"props":991,"children":992},{"style":108},[993],{"type":21,"value":198},{"type":16,"tag":101,"props":995,"children":996},{"class":103,"line":201},[997],{"type":16,"tag":101,"props":998,"children":999},{"style":108},[1000],{"type":21,"value":748},{"type":16,"tag":101,"props":1002,"children":1003},{"class":103,"line":210},[1004,1008],{"type":16,"tag":101,"props":1005,"children":1006},{"style":118},[1007],{"type":21,"value":135},{"type":16,"tag":101,"props":1009,"children":1010},{"style":108},[1011],{"type":21,"value":140},{"type":16,"tag":101,"props":1013,"children":1014},{"class":103,"line":219},[1015,1019,1023,1027,1031,1035,1039,1043,1047,1051,1056],{"type":16,"tag":101,"props":1016,"children":1017},{"style":108},[1018],{"type":21,"value":149},{"type":16,"tag":101,"props":1020,"children":1021},{"style":118},[1022],{"type":21,"value":154},{"type":16,"tag":101,"props":1024,"children":1025},{"style":108},[1026],{"type":21,"value":159},{"type":16,"tag":101,"props":1028,"children":1029},{"style":118},[1030],{"type":21,"value":164},{"type":16,"tag":101,"props":1032,"children":1033},{"style":108},[1034],{"type":21,"value":169},{"type":16,"tag":101,"props":1036,"children":1037},{"style":172},[1038],{"type":21,"value":175},{"type":16,"tag":101,"props":1040,"children":1041},{"style":108},[1042],{"type":21,"value":180},{"type":16,"tag":101,"props":1044,"children":1045},{"style":118},[1046],{"type":21,"value":175},{"type":16,"tag":101,"props":1048,"children":1049},{"style":108},[1050],{"type":21,"value":169},{"type":16,"tag":101,"props":1052,"children":1053},{"style":172},[1054],{"type":21,"value":1055},"\"[ $(( $(date +%s) - $(cat /tmp/claude-start) )) -gt 45 ] && afplay /System/Library/Sounds/Glass.aiff\"",{"type":16,"tag":101,"props":1057,"children":1058},{"style":108},[1059],{"type":21,"value":198},{"type":16,"tag":101,"props":1061,"children":1062},{"class":103,"line":809},[1063],{"type":16,"tag":101,"props":1064,"children":1065},{"style":108},[1066],{"type":21,"value":207},{"type":16,"tag":101,"props":1068,"children":1069},{"class":103,"line":817},[1070],{"type":16,"tag":101,"props":1071,"children":1072},{"style":108},[1073],{"type":21,"value":216},{"type":16,"tag":101,"props":1075,"children":1076},{"class":103,"line":825},[1077],{"type":16,"tag":101,"props":1078,"children":1079},{"style":108},[1080],{"type":21,"value":225},{"type":16,"tag":17,"props":1082,"children":1083},{},[1084,1086,1092,1094,1100],{"type":21,"value":1085},"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":1087,"children":1089},{"className":1088},[],[1090],{"type":21,"value":1091},"session_id",{"type":21,"value":1093}," from the payload instead of a shared ",{"type":16,"tag":24,"props":1095,"children":1097},{"className":1096},[],[1098],{"type":21,"value":1099},"/tmp",{"type":21,"value":1101}," path.",{"type":16,"tag":71,"props":1103,"children":1105},{"id":1104},"pick-the-right-event-not-all-of-them",[1106],{"type":21,"value":1107},"Pick the right event, not all of them",{"type":16,"tag":17,"props":1109,"children":1110},{},[1111,1116,1118,1124,1126,1132,1134,1139,1141,1146],{"type":16,"tag":24,"props":1112,"children":1114},{"className":1113},[],[1115],{"type":21,"value":29},{"type":21,"value":1117}," is the event you want for \"it is done\". Two neighbours look tempting and are traps. ",{"type":16,"tag":24,"props":1119,"children":1121},{"className":1120},[],[1122],{"type":21,"value":1123},"SubagentStop",{"type":21,"value":1125}," fires once per subagent, so a single fan-out can chime eight times in twenty seconds. ",{"type":16,"tag":24,"props":1127,"children":1129},{"className":1128},[],[1130],{"type":21,"value":1131},"SessionEnd",{"type":21,"value":1133}," 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":1135,"children":1137},{"className":1136},[],[1138],{"type":21,"value":29},{"type":21,"value":1140},"; if you wire two, add ",{"type":16,"tag":24,"props":1142,"children":1144},{"className":1143},[],[1145],{"type":21,"value":646},{"type":21,"value":1147},", because being blocked is the thing genuinely worth interrupting you for.",{"type":16,"tag":71,"props":1149,"children":1151},{"id":1150},"let-your-terminal-do-the-work",[1152],{"type":21,"value":1153},"Let your terminal do the work",{"type":16,"tag":17,"props":1155,"children":1156},{},[1157],{"type":21,"value":1158},"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":1160,"children":1162},{"className":93,"code":1161,"language":95,"meta":7,"style":7},"{\n  \"hooks\": {\n    \"Stop\": [\n      { \"hooks\": [{ \"type\": \"command\", \"command\": \"printf '\\\\a' > /dev/tty\" }] }\n    ]\n  }\n}\n",[1163],{"type":16,"tag":24,"props":1164,"children":1165},{"__ignoreMap":7},[1166,1173,1184,1195,1252,1259,1266],{"type":16,"tag":101,"props":1167,"children":1168},{"class":103,"line":104},[1169],{"type":16,"tag":101,"props":1170,"children":1171},{"style":108},[1172],{"type":21,"value":111},{"type":16,"tag":101,"props":1174,"children":1175},{"class":103,"line":114},[1176,1180],{"type":16,"tag":101,"props":1177,"children":1178},{"style":118},[1179],{"type":21,"value":121},{"type":16,"tag":101,"props":1181,"children":1182},{"style":108},[1183],{"type":21,"value":126},{"type":16,"tag":101,"props":1185,"children":1186},{"class":103,"line":129},[1187,1191],{"type":16,"tag":101,"props":1188,"children":1189},{"style":118},[1190],{"type":21,"value":135},{"type":16,"tag":101,"props":1192,"children":1193},{"style":108},[1194],{"type":21,"value":140},{"type":16,"tag":101,"props":1196,"children":1197},{"class":103,"line":143},[1198,1202,1206,1210,1214,1218,1222,1226,1230,1234,1239,1243,1248],{"type":16,"tag":101,"props":1199,"children":1200},{"style":108},[1201],{"type":21,"value":149},{"type":16,"tag":101,"props":1203,"children":1204},{"style":118},[1205],{"type":21,"value":154},{"type":16,"tag":101,"props":1207,"children":1208},{"style":108},[1209],{"type":21,"value":159},{"type":16,"tag":101,"props":1211,"children":1212},{"style":118},[1213],{"type":21,"value":164},{"type":16,"tag":101,"props":1215,"children":1216},{"style":108},[1217],{"type":21,"value":169},{"type":16,"tag":101,"props":1219,"children":1220},{"style":172},[1221],{"type":21,"value":175},{"type":16,"tag":101,"props":1223,"children":1224},{"style":108},[1225],{"type":21,"value":180},{"type":16,"tag":101,"props":1227,"children":1228},{"style":118},[1229],{"type":21,"value":175},{"type":16,"tag":101,"props":1231,"children":1232},{"style":108},[1233],{"type":21,"value":169},{"type":16,"tag":101,"props":1235,"children":1236},{"style":172},[1237],{"type":21,"value":1238},"\"printf '",{"type":16,"tag":101,"props":1240,"children":1241},{"style":118},[1242],{"type":21,"value":563},{"type":16,"tag":101,"props":1244,"children":1245},{"style":172},[1246],{"type":21,"value":1247},"a' > /dev/tty\"",{"type":16,"tag":101,"props":1249,"children":1250},{"style":108},[1251],{"type":21,"value":198},{"type":16,"tag":101,"props":1253,"children":1254},{"class":103,"line":201},[1255],{"type":16,"tag":101,"props":1256,"children":1257},{"style":108},[1258],{"type":21,"value":207},{"type":16,"tag":101,"props":1260,"children":1261},{"class":103,"line":210},[1262],{"type":16,"tag":101,"props":1263,"children":1264},{"style":108},[1265],{"type":21,"value":216},{"type":16,"tag":101,"props":1267,"children":1268},{"class":103,"line":219},[1269],{"type":16,"tag":101,"props":1270,"children":1271},{"style":108},[1272],{"type":21,"value":225},{"type":16,"tag":17,"props":1274,"children":1275},{},[1276,1278,1284,1286,1291],{"type":21,"value":1277},"Then let tmux flag the window it came from, so the sound tells you ",{"type":16,"tag":1279,"props":1280,"children":1281},"em",{},[1282],{"type":21,"value":1283},"where",{"type":21,"value":1285}," as well as ",{"type":16,"tag":1279,"props":1287,"children":1288},{},[1289],{"type":21,"value":1290},"what",{"type":21,"value":89},{"type":16,"tag":91,"props":1293,"children":1297},{"className":1294,"code":1295,"language":1296,"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",[1298],{"type":16,"tag":24,"props":1299,"children":1300},{"__ignoreMap":7},[1301,1310,1333],{"type":16,"tag":101,"props":1302,"children":1303},{"class":103,"line":104},[1304],{"type":16,"tag":101,"props":1305,"children":1307},{"style":1306},"--shiki-default:#6A737D;--shiki-dark:#6A737D",[1308],{"type":21,"value":1309},"# ~/.tmux.conf\n",{"type":16,"tag":101,"props":1311,"children":1312},{"class":103,"line":114},[1313,1318,1323,1328],{"type":16,"tag":101,"props":1314,"children":1315},{"style":118},[1316],{"type":21,"value":1317},"set",{"type":16,"tag":101,"props":1319,"children":1320},{"style":118},[1321],{"type":21,"value":1322}," -g",{"type":16,"tag":101,"props":1324,"children":1325},{"style":172},[1326],{"type":21,"value":1327}," monitor-bell",{"type":16,"tag":101,"props":1329,"children":1330},{"style":172},[1331],{"type":21,"value":1332}," on\n",{"type":16,"tag":101,"props":1334,"children":1335},{"class":103,"line":129},[1336,1340,1344,1349],{"type":16,"tag":101,"props":1337,"children":1338},{"style":118},[1339],{"type":21,"value":1317},{"type":16,"tag":101,"props":1341,"children":1342},{"style":118},[1343],{"type":21,"value":1322},{"type":16,"tag":101,"props":1345,"children":1346},{"style":172},[1347],{"type":21,"value":1348}," visual-bell",{"type":16,"tag":101,"props":1350,"children":1351},{"style":172},[1352],{"type":21,"value":1353}," both\n",{"type":16,"tag":17,"props":1355,"children":1356},{},[1357],{"type":21,"value":1358},"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":1360,"children":1362},{"id":1361},"why-nothing-plays",[1363],{"type":21,"value":1364},"Why nothing plays",{"type":16,"tag":17,"props":1366,"children":1367},{},[1368,1370,1376,1378,1384],{"type":21,"value":1369},"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":1371,"children":1373},{"className":1372},[],[1374],{"type":21,"value":1375},"/hooks",{"type":21,"value":1377},". 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":1379,"children":1381},{"className":1380},[],[1382],{"type":21,"value":1383},"claude --debug",{"type":21,"value":1385}," and you will see the hook fire and the player fail.",{"type":16,"tag":71,"props":1387,"children":1389},{"id":1388},"when-a-sound-is-not-enough",[1390],{"type":21,"value":1391},"When a sound is not enough",{"type":16,"tag":17,"props":1393,"children":1394},{},[1395,1397,1402,1404,1409,1411,1415,1417,1422],{"type":21,"value":1396},"A sound tells you ",{"type":16,"tag":1279,"props":1398,"children":1399},{},[1400],{"type":21,"value":1401},"something",{"type":21,"value":1403}," happened; it does not tell you ",{"type":16,"tag":1279,"props":1405,"children":1406},{},[1407],{"type":21,"value":1408},"which",{"type":21,"value":1410}," session, or ",{"type":16,"tag":1279,"props":1412,"children":1413},{},[1414],{"type":21,"value":1290},{"type":21,"value":1416},". 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":1418,"children":1420},{"className":1419},[],[1421],{"type":21,"value":1123},{"type":21,"value":1423}," to the mix and a busy run can chime a dozen times without ever being done.",{"type":16,"tag":17,"props":1425,"children":1426},{},[1427,1433],{"type":16,"tag":38,"props":1428,"children":1430},{"href":1429},"/",[1431],{"type":21,"value":1432},"Blooby",{"type":21,"value":1434}," 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":1436,"props":1437,"children":1438},"style",{},[1439],{"type":21,"value":1440},"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":1442},[1443,1444,1445,1446,1447,1448,1449,1450,1451,1452],{"id":73,"depth":114,"text":76},{"id":287,"depth":114,"text":290},{"id":470,"depth":114,"text":473},{"id":632,"depth":114,"text":635},{"id":838,"depth":114,"text":841},{"id":886,"depth":114,"text":889},{"id":1104,"depth":114,"text":1107},{"id":1150,"depth":114,"text":1153},{"id":1361,"depth":114,"text":1364},{"id":1388,"depth":114,"text":1391},"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]