Summary
settings.json has notifications.voice.enabled: false, but voice announcements still play on every prompt submit and after every response completes. The settings toggle is disconnected from both actual voice producers.
Two Independent Voice Sources (Neither Checks Settings)
Source 1: VoiceCompletion.hook.ts (Stop event)
- Trigger: After every response — extracts
🗣️ Viki: line, sends to localhost:8888/notify
- Gate: Only checks
isMainSession() (skips subagents) — never reads notifications.voice.enabled
- Config location:
settings.json Stop hooks array, line ~237
- File:
hooks/VoiceCompletion.hook.ts → hooks/handlers/VoiceNotification.ts
Source 2: Inline curl commands in CLAUDE.md / Algorithm
- Trigger: On prompt submit — DA executes hardcoded curl to
localhost:8888/notify
- Gate: None — it's a prompt instruction, always followed
- Locations:
CLAUDE.md line 21: "Executing using PAI native mode"
PAI/Algorithm/v3.7.0.md line 136: "Entering the Algorithm"
- Various agent files (
Engineer.md, ClaudeResearcher.md, PerplexityResearcher.md, etc.)
What notifications.voice.enabled Actually Controls
Nothing that produces voice. The flag at settings.json line 371 exists but neither voice source reads it.
Proposed Fix
Option A: Wire up the settings check (recommended)
- VoiceCompletion hook: Read
notifications.voice.enabled from settings.json early in the handler; exit if false
- CLAUDE.md / Algorithm: Wrap voice commands in a conditional: "Only execute the voice curl if
notifications.voice.enabled is true in settings.json" — or better, have a shared gate function the DA calls
Option B: Quick disable
- Remove
VoiceCompletion.hook.ts from the Stop hooks array in settings.json
- Remove/comment the curl commands from CLAUDE.md and Algorithm files
- Downside: re-enabling requires manual reversal in multiple files
Option C: Voice server gate
Have the localhost:8888 voice server itself check the settings flag before playing audio. Single point of control, but adds a dependency.
Files
hooks/VoiceCompletion.hook.ts
hooks/handlers/VoiceNotification.ts
CLAUDE.md (line 21)
PAI/Algorithm/v3.7.0.md (lines 38, 136)
PAI/Algorithm/v3.5.0.md (lines 26, 116)
- Agent files:
agents/Engineer.md, agents/ClaudeResearcher.md, agents/PerplexityResearcher.md
settings.json (notifications.voice.enabled at line ~371)
Summary
settings.jsonhasnotifications.voice.enabled: false, but voice announcements still play on every prompt submit and after every response completes. The settings toggle is disconnected from both actual voice producers.Two Independent Voice Sources (Neither Checks Settings)
Source 1:
VoiceCompletion.hook.ts(Stop event)🗣️ Viki:line, sends tolocalhost:8888/notifyisMainSession()(skips subagents) — never readsnotifications.voice.enabledsettings.jsonStop hooks array, line ~237hooks/VoiceCompletion.hook.ts→hooks/handlers/VoiceNotification.tsSource 2: Inline
curlcommands in CLAUDE.md / Algorithmlocalhost:8888/notifyCLAUDE.mdline 21:"Executing using PAI native mode"PAI/Algorithm/v3.7.0.mdline 136:"Entering the Algorithm"Engineer.md,ClaudeResearcher.md,PerplexityResearcher.md, etc.)What
notifications.voice.enabledActually ControlsNothing that produces voice. The flag at
settings.jsonline 371 exists but neither voice source reads it.Proposed Fix
Option A: Wire up the settings check (recommended)
notifications.voice.enabledfrom settings.json early in the handler; exit iffalsenotifications.voice.enabledistruein settings.json" — or better, have a shared gate function the DA callsOption B: Quick disable
VoiceCompletion.hook.tsfrom the Stop hooks array in settings.jsonOption C: Voice server gate
Have the
localhost:8888voice server itself check the settings flag before playing audio. Single point of control, but adds a dependency.Files
hooks/VoiceCompletion.hook.tshooks/handlers/VoiceNotification.tsCLAUDE.md(line 21)PAI/Algorithm/v3.7.0.md(lines 38, 136)PAI/Algorithm/v3.5.0.md(lines 26, 116)agents/Engineer.md,agents/ClaudeResearcher.md,agents/PerplexityResearcher.mdsettings.json(notifications.voice.enabledat line ~371)