From 86395a85a044fb06c25067ce700d902780e6287b Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 7 Jul 2026 14:35:52 +0000 Subject: [PATCH] claude_desktop: surface headroom MCP removal failures instead of swallowing them The removal block's json.loads() was wrapped in a bare try/except that set data = None on any parse error, then silently no-op'd (isinstance(data, dict) is False) with exit 0 -- so a malformed claude_desktop_config.json meant the headroom entry was never removed and bashio::log.warning never fired. Drop the try/except so parse errors propagate naturally and the script exits non-zero, matching the sibling rtk removal block's existing convention and triggering the bashio::log.warning fallback. Co-Authored-By: Claude Sonnet 5 Claude-Session: https://claude.ai/code/session_01MgMcG1QjsSHcDQBxgPpRUw --- claude_desktop/rootfs/etc/cont-init.d/82-claude_tools.sh | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/claude_desktop/rootfs/etc/cont-init.d/82-claude_tools.sh b/claude_desktop/rootfs/etc/cont-init.d/82-claude_tools.sh index a85da0b9c1..ca1ac2faa5 100755 --- a/claude_desktop/rootfs/etc/cont-init.d/82-claude_tools.sh +++ b/claude_desktop/rootfs/etc/cont-init.d/82-claude_tools.sh @@ -51,10 +51,7 @@ import os from pathlib import Path path = Path(os.environ["CLAUDE_DESKTOP_CONFIG"]) -try: - data = json.loads(path.read_text()) -except Exception: - data = None +data = json.loads(path.read_text()) if isinstance(data, dict): servers = data.get("mcpServers") if isinstance(servers, dict) and servers.pop("headroom", None) is not None: