π OpenHands: AI-Driven Development
Remove OpenHands start and stop hooks (#345)
Rohit Malhotraa32d621417ca
diff --git a/.openhands/hooks.json b/.openhands/hooks.jsondeleted file mode 100644index fae5e2cc34..0000000000--- a/.openhands/hooks.json+++ /dev/null@@ -1,26 +0,0 @@-{- "session_start": [- {- "matcher": "*",- "hooks": [- {- "type": "command",- "command": ".openhands/setup.sh",- "timeout": 300- }- ]- }- ],- "stop": [- {- "matcher": "*",- "hooks": [- {- "type": "command",- "command": ".openhands/hooks/on_stop.sh",- "timeout": 600- }- ]- }- ]-}diff --git a/.openhands/hooks/on_stop.sh b/.openhands/hooks/on_stop.shdeleted file mode 100755index 2d2e0fffb1..0000000000--- a/.openhands/hooks/on_stop.sh+++ /dev/null@@ -1,34 +0,0 @@-#!/usr/bin/env bash-# Stop hook: runs the repo quality gate before allowing OpenHands to finish.-#-# Hooks can block agent completion by exiting with code 2 and returning JSON.-# Keep this aligned with the checks that should run before an agent declares-# repository work complete.--set -o pipefail--PROJECT_DIR="${OPENHANDS_PROJECT_DIR:-$(pwd)}"-cd "$PROJECT_DIR" || exit 1--run_check() {- local name="$1"- shift-- echo "=== Running ${name} ===" >&2- local output- output=$("$@" 2>&1)- local exit_code=$?- echo "$output" >&2-- if [ "$exit_code" -ne 0 ]; then- local escaped_output- escaped_output=$(printf '%s' "$output" | jq -Rs .)- printf '{"decision":"deny","reason":"%s failed","additionalContext":%s}\n' "$name" "$escaped_output"- exit 2- fi-}--run_check "npm run lint" npm run lint-run_check "npm test" npm test--echo '{"decision":"allow"}'