From 73bda1aad6ca5f9fb1297f0daa313410d87c7e9d Mon Sep 17 00:00:00 2001 From: Affaan Mustafa Date: Thu, 22 Jan 2026 16:42:04 -0800 Subject: [PATCH] fix: use ${CLAUDE_PLUGIN_ROOT} for hook script paths Relative paths like ./hooks/... fail when the plugin is installed because hooks run in the project directory, not the plugin directory. Using ${CLAUDE_PLUGIN_ROOT} ensures scripts are found regardless of where the plugin is installed. Fixed paths: - hooks/strategic-compact/suggest-compact.sh - hooks/memory-persistence/pre-compact.sh - hooks/memory-persistence/session-start.sh - hooks/memory-persistence/session-end.sh - skills/continuous-learning/evaluate-session.sh --- hooks/hooks.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/hooks/hooks.json b/hooks/hooks.json index 4b3f415..b09b5bb 100644 --- a/hooks/hooks.json +++ b/hooks/hooks.json @@ -47,7 +47,7 @@ "hooks": [ { "type": "command", - "command": "./hooks/strategic-compact/suggest-compact.sh" + "command": "${CLAUDE_PLUGIN_ROOT}/hooks/strategic-compact/suggest-compact.sh" } ], "description": "Suggest manual compaction at logical intervals" @@ -59,7 +59,7 @@ "hooks": [ { "type": "command", - "command": "./hooks/memory-persistence/pre-compact.sh" + "command": "${CLAUDE_PLUGIN_ROOT}/hooks/memory-persistence/pre-compact.sh" } ], "description": "Save state before context compaction" @@ -71,7 +71,7 @@ "hooks": [ { "type": "command", - "command": "./hooks/memory-persistence/session-start.sh" + "command": "${CLAUDE_PLUGIN_ROOT}/hooks/memory-persistence/session-start.sh" } ], "description": "Load previous context on new session" @@ -135,7 +135,7 @@ "hooks": [ { "type": "command", - "command": "./hooks/memory-persistence/session-end.sh" + "command": "${CLAUDE_PLUGIN_ROOT}/hooks/memory-persistence/session-end.sh" } ], "description": "Persist session state on end" @@ -145,7 +145,7 @@ "hooks": [ { "type": "command", - "command": "./skills/continuous-learning/evaluate-session.sh" + "command": "${CLAUDE_PLUGIN_ROOT}/skills/continuous-learning/evaluate-session.sh" } ], "description": "Evaluate session for extractable patterns"