From 0be64bdf31f43a18a2295c6f8e4143b95768f659 Mon Sep 17 00:00:00 2001 From: openhands Date: Mon, 23 Mar 2026 08:59:56 +0000 Subject: [PATCH 1/2] fix: Hook scripts don't follow #!/usr/bin/env bash convention from AGENTS.md (#330) Co-Authored-By: Claude Opus 4.6 (1M context) --- lib/hooks/on-compact-reinject.sh | 2 +- lib/hooks/on-idle-stop.sh | 2 +- lib/hooks/on-phase-change.sh | 2 +- lib/hooks/on-pretooluse-guard.sh | 2 +- lib/hooks/on-session-end.sh | 2 +- lib/hooks/on-stop-failure.sh | 2 +- lib/hooks/on-stop-matrix.sh | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/hooks/on-compact-reinject.sh b/lib/hooks/on-compact-reinject.sh index 320f2a1..19640af 100755 --- a/lib/hooks/on-compact-reinject.sh +++ b/lib/hooks/on-compact-reinject.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # on-compact-reinject.sh — SessionStart (compact) hook for dark-factory agent sessions. # # Called by Claude Code after context compaction. Reads a context file and diff --git a/lib/hooks/on-idle-stop.sh b/lib/hooks/on-idle-stop.sh index c8e4e5f..f74f819 100755 --- a/lib/hooks/on-idle-stop.sh +++ b/lib/hooks/on-idle-stop.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # on-idle-stop.sh — Stop hook for dark-factory agent sessions. # # Called by Claude Code when it finishes a response. Writes a timestamp diff --git a/lib/hooks/on-phase-change.sh b/lib/hooks/on-phase-change.sh index ab2c17f..d5d6077 100755 --- a/lib/hooks/on-phase-change.sh +++ b/lib/hooks/on-phase-change.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # on-phase-change.sh — PostToolUse hook for phase file write detection. # # Called by Claude Code after every Bash|Write tool execution. diff --git a/lib/hooks/on-pretooluse-guard.sh b/lib/hooks/on-pretooluse-guard.sh index 7d9e317..249d3ca 100755 --- a/lib/hooks/on-pretooluse-guard.sh +++ b/lib/hooks/on-pretooluse-guard.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # on-pretooluse-guard.sh — PreToolUse hook: guard destructive operations. # # Called by Claude Code before executing a Bash command in agent sessions. diff --git a/lib/hooks/on-session-end.sh b/lib/hooks/on-session-end.sh index 2ceaeea..9261b06 100755 --- a/lib/hooks/on-session-end.sh +++ b/lib/hooks/on-session-end.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # on-session-end.sh — SessionEnd hook for dark-factory agent sessions. # # Called by Claude Code when a session terminates (clean exit, logout, diff --git a/lib/hooks/on-stop-failure.sh b/lib/hooks/on-stop-failure.sh index 6c78ade..968d2a9 100755 --- a/lib/hooks/on-stop-failure.sh +++ b/lib/hooks/on-stop-failure.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # on-stop-failure.sh — StopFailure hook for immediate phase file update on API error. # # Called by Claude Code when a turn ends due to an API error (rate limit, diff --git a/lib/hooks/on-stop-matrix.sh b/lib/hooks/on-stop-matrix.sh index c85276b..e7999cc 100755 --- a/lib/hooks/on-stop-matrix.sh +++ b/lib/hooks/on-stop-matrix.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # on-stop-matrix.sh — Stop hook: post Claude response to Matrix thread. # # Called by Claude Code after each assistant turn. Reads the response from From 0e5f4607c7a746b96e571908a77973d1fb4115e3 Mon Sep 17 00:00:00 2001 From: openhands Date: Mon, 23 Mar 2026 09:01:57 +0000 Subject: [PATCH 2/2] chore: retrigger CI