奇怪的coreaudiod内存占用
11:50~12:00
我的 coreaudiod 进程已经占用了 45 个 G 的内存,我怀疑是命令行里面溢出了。
现在我非常怀疑是 CC 里面的这个声音播报占用的。

果然在帖子 https://www.reddit.com/r/ClaudeCode/comments/1n9wth1/why_does_running_claude_code_often_use_2040gb_of/ 里也看到,有人加了hook播放音效,导致coreaudiod内存泄露。
我现在需要把 Claude 的 hook 给去掉,然后就直接用我终端本身的音效来设置一下。
我的终端用的是 Ghosty,我得查一查。
先卸载peonping:
brew uninstall PeonPing/tap/peon-ping
保留了之前下载的音效包 /Users/rhett/.openpeon/packs/*
再根据ghostty文档重新配置:
theme = Solarized Darcula
notify-on-command-finish = always
notify-on-command-finish-action = notify,bell
notify-on-command-finish-after = 1s
# 启用自定义音频 bell(必须 1.3.0+)
bell-features = audio,system,border,title
# 自定义音效路径(推荐先用系统自带,后面再换自己的)
# 格式:aiff/wav/mp3 均可
bell-audio-path = /Users/rhett/.openpeon/packs/ccg_china_dozer/sounds/Building_is_complete.mp3
bell-audio-volume = 1.0
并且配置了.claude/settings.json ,hooks只保留写死的两条afplay:
"hooks": {
"PermissionRequest": [
{
"matcher": "*",
"hooks": [
{
"type": "command",
"command": "afplay /Users/rhett/.openpeon/packs/mambo_pack/sounds/review_this.mp3"
}
]
}
],
"Stop": [
{
"matcher": "*",
"hooks": [
{
"type": "command",
"command": "afplay /Users/rhett/.openpeon/packs/mambo_pack/sounds/done.mp3"
}
]
}
]
},