diff --git a/claude_desktop/CHANGELOG.md b/claude_desktop/CHANGELOG.md index 532e04f811..3a50ec848b 100644 --- a/claude_desktop/CHANGELOG.md +++ b/claude_desktop/CHANGELOG.md @@ -1,7 +1,7 @@ ## 1.6 (07-07-2026) -- Fix default desktop launch failing when `install_headroom` is enabled (the default). `headroom wrap` only supports coding-agent CLIs (`claude`, `codex`, ...) with agent arguments after `--`, so wrapping `claude-desktop` produced an invalid command that left the app unlaunched. Keep the plain Claude Desktop launch and instead just expose `headroom` with a usage hint. -- Make the autostart resilient: if a custom/wrapped launch command fails to start, fall back to the default Claude Desktop launch so the app still comes up. +- Fix default desktop launch failing when `install_headroom` is enabled (the default): `headroom wrap` only supports coding-agent CLIs (`claude`, `codex`, ...) with agent arguments after `--`, so wrapping `claude-desktop` produced an invalid command that left the app unlaunched. Launch Claude Desktop through headroom's standalone compression proxy (`headroom proxy` + `ANTHROPIC_BASE_URL`) instead. Note: Claude Desktop currently overrides `ANTHROPIC_BASE_URL` ([headroom #869](https://github.com/headroomlabs-ai/headroom/issues/869)), so transparent compression engages only once upstream adds Desktop support; the app launches normally in the meantime. +- Make the autostart resilient: if the headroom/custom launch command fails to start, fall back to the plain Claude Desktop launch so the app always comes up. ## 1.5 (07-07-2026) diff --git a/claude_desktop/README.md b/claude_desktop/README.md index 5cb6e4421d..76afc1e432 100644 --- a/claude_desktop/README.md +++ b/claude_desktop/README.md @@ -38,7 +38,7 @@ Claude Desktop sign-in requires a claude.ai plan that supports the Desktop app. | `DRINODE` | | Optional GPU device override for Selkies. | | `DNS_server` | `8.8.8.8` | DNS server used by the standard DNS module. | | `auto_update` | `true` | Check Anthropic's apt repository and upgrade `claude-desktop` at add-on startup. | -| `install_headroom` | `true` | Make the baked-in `headroom` command available and log a usage hint. | +| `install_headroom` | `true` | Launch Claude Desktop through the baked-in `headroom` compression proxy. Note: Claude Desktop currently overrides the proxy endpoint ([headroom #869](https://github.com/headroomlabs-ai/headroom/issues/869)), so transparent compression only engages once upstream adds Desktop support; the app still launches normally, and falls back to a plain launch if the proxy command fails. | | `install_rtk` | `true` | Configure the rtk Claude Code `PreToolUse` hook in the persistent Claude Code settings. | | `install_caveman` | `true` | Install the caveman Claude Code plugin into the persistent Claude Code home. | | `install_github_cli` | `true` | Enable first-start checks and setup for the baked-in `git` and `gh` commands. | 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 6a048783c6..ed081a882c 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 @@ -10,11 +10,18 @@ printf '%s\n' "$DEFAULT_CLAUDE_DESKTOP_COMMAND" > "$CLAUDE_DESKTOP_COMMAND_FILE" if bashio::config.true 'install_headroom'; then if command -v headroom &> /dev/null; then - # headroom "wrap" only supports coding-agent CLIs (claude|codex|cursor|...), - # not the Claude Desktop Electron app. Wrapping "claude-desktop" produced an - # invalid command that left the desktop app unlaunched, so keep the default - # launch untouched and just expose headroom for the user to wrap Claude Code. - bashio::log.info "headroom $(headroom --version 2> /dev/null || true) available; run 'headroom wrap claude' in a terminal to route Claude Code through headroom" + # headroom "wrap" only supports coding-agent CLIs (claude|codex|cursor|...) and is + # invalid for the Claude Desktop Electron app, so route the launch through headroom's + # standalone compression proxy instead: start "headroom proxy" and point Claude Desktop + # at it via ANTHROPIC_BASE_URL. + # + # NOTE: Claude Desktop currently force-overrides ANTHROPIC_BASE_URL to the production + # endpoint (headroom #869), so compression only actually engages once upstream adds + # Desktop support. Until then the app still launches normally, and the autostart falls + # back to a plain launch if this command fails. + HEADROOM_PROXY_PORT="8787" + bashio::log.info "headroom $(headroom --version 2> /dev/null || true) available; launching Claude Desktop through the headroom proxy on 127.0.0.1:${HEADROOM_PROXY_PORT} (transparent compression pending Claude Desktop support, headroom #869)" + printf '%s\n' "headroom proxy --port ${HEADROOM_PROXY_PORT} > /tmp/headroom-proxy.log 2>&1 & ANTHROPIC_BASE_URL=http://127.0.0.1:${HEADROOM_PROXY_PORT} ${DEFAULT_CLAUDE_DESKTOP_COMMAND}" > "$CLAUDE_DESKTOP_COMMAND_FILE" else bashio::log.warning "headroom is not available" fi