From 1079fff412ca978548e42af79b3f1b7ad7912686 Mon Sep 17 00:00:00 2001 From: JJ Liebig Date: Wed, 12 Aug 2026 21:13:21 +0200 Subject: fix: use the running binary in agent hooks (#2722) --- src/integration/assets/claude/herdr-agent-state.ps1 | 5 +++-- src/integration/assets/claude/herdr-agent-state.sh | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'src/integration/assets/claude') diff --git a/src/integration/assets/claude/herdr-agent-state.ps1 b/src/integration/assets/claude/herdr-agent-state.ps1 index dcc9d4df..d82a6fe3 100644 --- a/src/integration/assets/claude/herdr-agent-state.ps1 +++ b/src/integration/assets/claude/herdr-agent-state.ps1 @@ -2,7 +2,7 @@ # managed by herdr; reinstalling or updating the integration overwrites this file. # add custom hooks beside this file instead of editing it. # HERDR_INTEGRATION_ID=claude -# HERDR_INTEGRATION_VERSION=7 +# HERDR_INTEGRATION_VERSION=8 param([string]$Action = "") @@ -24,6 +24,7 @@ $sessionId = $payload.session_id if ([string]::IsNullOrWhiteSpace($sessionId)) { exit 0 } $seq = [DateTimeOffset]::UtcNow.ToUnixTimeMilliseconds() +$herdr = if ([string]::IsNullOrWhiteSpace($env:HERDR_BIN_PATH)) { "herdr" } else { $env:HERDR_BIN_PATH } try { $args = @( "pane", @@ -44,6 +45,6 @@ try { if ($payload.hook_event_name -eq "SessionStart" -and $payload.source -is [string] -and -not [string]::IsNullOrWhiteSpace($payload.source)) { $args += @("--session-start-source", "$($payload.source)") } - & herdr @args 2>$null | Out-Null + & $herdr @args 2>$null | Out-Null } catch { } diff --git a/src/integration/assets/claude/herdr-agent-state.sh b/src/integration/assets/claude/herdr-agent-state.sh index cb5e840d..9b9a7dfd 100644 --- a/src/integration/assets/claude/herdr-agent-state.sh +++ b/src/integration/assets/claude/herdr-agent-state.sh @@ -3,7 +3,7 @@ # managed by herdr; reinstalling or updating the integration overwrites this file. # add custom hooks beside this file instead of editing it. # HERDR_INTEGRATION_ID=claude -# HERDR_INTEGRATION_VERSION=7 +# HERDR_INTEGRATION_VERSION=8 set -eu -- cgit v1.2.3