fix(claude): register the binary by its symlink, not the build behind it - #36
Merged
Merged
Conversation
Since builds land at .sinteractive-<sha> behind a `sinteractive` symlink (#30), current_exe() resolves to the build's own file, and `claude install` (#29, absolute paths) wrote that name into the hooks, the statusline and the MCP entry. That name is one a later install prunes once no session can be running it, which would have left every hook pointing at nothing. Worse, the identity and migration regexes did not recognise the spelling as this program, so each run migrated the stable entries onto the build's name and then appended the snippet's entries again: two copies of every hook after one run. The registered name is now the symlink when one beside the binary resolves to it (a plain file keeps its own name), `.sinteractive-<hex>` counts as this program wherever a command is examined — hooks and the MCP entry — so what the broken install wrote is migrated back, and duplicate entries of ours are folded into one. The user's own entries are never touched, however alike. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MuezDnJq5Qh34SoGGAgzZU
This was referenced Aug 29, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
sinteractive claude installafter #30 + #29 registered the hooks, statusline and MCP server under the build's own file,~/.local/bin/.sinteractive-<sha>(current_exe()resolves the symlink) — a name a later install prunes, which would have left every hook pointing at nothing. And because the identity/migration regexes did not recognise that spelling as this program, each run migrated the stable entries onto the versioned name and then appended the snippet's entries again: after one run, two copies of every hook. Seen on this user'ssettings.jsontoday.What
exe_command()registers thesinteractivesymlink when one beside the binary resolves to it (stable_exe); a plain file keeps its own name..sinteractive-<hex>counts as this program wherever a command is examined —hook_identity,renamed_command,is_our_mcp_entry— so what the broken install wrote is migrated back onto the stable name.dedupe_our_hooks: duplicate entries of ours within an event are folded into one; the user's own entries are never touched, however alike.CARGO_TARGET_DIRper project/agent — two cargo runs from different nodes in one target dir clobber each other (seen today).Tested
Unit tests for the symlink resolution (tempdir), the versioned spellings, dedupe, MCP repoint;
cargo test -p sint -- install_claude::and theinstall_claudeintegration tests passed in a private target dir before the shared cache was wiped mid-session by another job; CI is the full run.🤖 Generated with Claude Code
https://claude.ai/code/session_01MuezDnJq5Qh34SoGGAgzZU