MCP: get_active_audio_route conditionally unregistered when voice DAG fails; preamble still advertises it #25

Open
opened 2026-05-12 19:05:34 +00:00 by KofTwentyTwo · 0 comments
KofTwentyTwo commented 2026-05-12 19:05:34 +00:00 (Migrated from github.com)

Summary

get_active_audio_route tool registration is conditional on audioGraphOwner != nil. When voice fails (e.g., missing OpenWakeWord/Silero models on first launch), the tool catalog doesn't include get_active_audio_route, but the Round-4 self-aware preamble still names it as a tool the model should prefer. The model emits a tool_use for it → composite dispatcher fails-unknown → orchestrator records ERROR → user-facing chat shows tool failure.

Evidence

  • File: App/AppDelegate.swift:1966-1976 — installSelfKnowledgeTools registers GetActiveAudioRouteTool only inside if let owner = self.audioGraphOwner. Else: systemLogger?.warning("…get_active_audio_route not registered")
  • File: packages/AgentCore/Sources/AgentCore/ContextBuilder.swift — selfAwarePreamble names get_active_audio_route

Root cause / hypothesis

Wired-but-conditionally-dead pattern. Round-4 degradation summary already handles "voice unhealthy" at the system-prompt level — extend it to omit the tool name from the preamble when the subsystem is dead.

Recommended fix

Either:

  1. Always register a dispatcher that returns {"route": null} when the owner is missing (preserves the catalog promise — recommended)
  2. Gate the preamble's mention of the tool on whether voice is healthy at boot (Round-4 mechanism already exists)

Option 1 is the cleaner contract — the tool always works, just returns null when unavailable. Mirrors the M-1 memoryVectorAvailable typed-result pattern.

Test

  • Boot with voice disabled → tool catalog still contains get_active_audio_route → calling it returns {"route": null} without error

Source

  • Audit: .planning/audit-2026-05-12/mcp-agent-audit.md (2026-05-12) — finding MED-1
## Summary `get_active_audio_route` tool registration is conditional on `audioGraphOwner != nil`. When voice fails (e.g., missing OpenWakeWord/Silero models on first launch), the tool catalog doesn't include `get_active_audio_route`, but the Round-4 self-aware preamble still names it as a tool the model should prefer. The model emits a `tool_use` for it → composite dispatcher fails-unknown → orchestrator records ERROR → user-facing chat shows tool failure. ## Evidence - File: `App/AppDelegate.swift:1966-1976` — `installSelfKnowledgeTools` registers `GetActiveAudioRouteTool` only inside `if let owner = self.audioGraphOwner`. Else: `systemLogger?.warning("…get_active_audio_route not registered")` - File: `packages/AgentCore/Sources/AgentCore/ContextBuilder.swift` — `selfAwarePreamble` names `get_active_audio_route` ## Root cause / hypothesis Wired-but-conditionally-dead pattern. Round-4 degradation summary already handles "voice unhealthy" at the system-prompt level — extend it to omit the tool name from the preamble when the subsystem is dead. ## Recommended fix Either: 1. Always register a dispatcher that returns `{"route": null}` when the owner is missing (preserves the catalog promise — recommended) 2. Gate the preamble's mention of the tool on whether voice is healthy at boot (Round-4 mechanism already exists) Option 1 is the cleaner contract — the tool always works, just returns `null` when unavailable. Mirrors the M-1 `memoryVectorAvailable` typed-result pattern. ## Test - Boot with voice disabled → tool catalog still contains `get_active_audio_route` → calling it returns `{"route": null}` without error ## Source - Audit: `.planning/audit-2026-05-12/mcp-agent-audit.md` (2026-05-12) — finding MED-1
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: KofTwentyTwo/Jarvis#25