Skip to content

Replace a stale native Claude left by an old claude update (2.5.1) - #81

Merged
ESJavadex merged 1 commit into
mainfrom
fix/stale-native-claude
Nov 3, 2026
Merged

ESJavadex merged 1 commit into
mainfrom
fix/stale-native-claude

Conversation

@ESJavadex

Copy link
Copy Markdown
Owner

Found while testing 2.5.0 on a real install (Raspberry Pi, aarch64).

The bug

~/.local/bin comes first in PATH. init_environment only created the ~/.local/bin/claude link when it was missing, and left any working link alone. So a claude update run once inside the add-on pinned that version for good. On this install, claude in bash was 2.1.38 from February, while the image ships 2.1.316. That old version rejects the bundled plugin's plugin.json (Unrecognized keys: "$schema", "displayName"), so claude plugin list showed it as failed to load. setup_ha_plugin's claude plugin calls also ran the old binary.

The panel's launch command calls /usr/local/bin/claude directly, so sessions started from the panel were not affected: with 2.1.316 the plugin loads with no errors.

The fix

  • At startup, relink_stale_native_claude points the link back at the image's Claude when the native copy is older or no longer runs, and removes the old ~250 MB binary from versions/.
  • A claude update newer than the image is still kept.
  • Both version checks end in || true, so a binary that won't run can't stop startup under set -e.

Tests

tests/test-native-claude.sh (added to run-tests.sh) covers these cases:

  • older: relinked and the binary removed;
  • newer: kept;
  • same version: kept;
  • broken: relinked;
  • plain file: untouched;
  • unreadable image version: no change.

🤖 Generated with Claude Code

~/.local/bin/claude comes first in PATH. A link left there by `claude
update` was kept forever, so after image updates `claude` in the shell
(and setup_ha_plugin's `claude plugin` calls) ran an old version: 2.1.38
on a real install, which rejects the bundled plugin's manifest.

At startup, relink it to the image's Claude when it is older or broken
and remove the old binary; a newer `claude update` is still kept. The
version checks can't stop startup under set -e.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ESJavadex
ESJavadex merged commit 6c57d05 into main Nov 3, 2026
6 checks passed
@ESJavadex
ESJavadex deleted the fix/stale-native-claude branch November 3, 2026 19:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant