Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions .claude/hooks/scripts/hooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,8 +174,10 @@ def play_sound(sound_name):
# SND_NODEFAULT: don't play default sound if file not found
# Note: Using SND_SYNC instead of SND_ASYNC because the script exits immediately
# after this call, which would terminate async playback before it completes
winsound.PlaySound(str(file_path),
winsound.SND_FILENAME | winsound.SND_NODEFAULT)
winsound.PlaySound(
str(file_path),
winsound.SND_FILENAME | winsound.SND_SYNC | winsound.SND_NODEFAULT
)
return True
else:
# winsound not available, fail silently
Expand Down Expand Up @@ -478,4 +480,4 @@ def main():

# Entry point - Python calls main() when the script runs
if __name__ == "__main__":
main()
main()
6 changes: 4 additions & 2 deletions .codex/hooks/scripts/hooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,10 @@ def play_sound(sound_name):
try:
if is_windows:
if winsound:
winsound.PlaySound(str(file_path),
winsound.SND_FILENAME | winsound.SND_NODEFAULT)
winsound.PlaySound(
str(file_path),
winsound.SND_FILENAME | winsound.SND_SYNC | winsound.SND_NODEFAULT
)
return True
else:
return False
Expand Down