Skip to content

armgit / ECC

Public Imported from GitHub
0

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

fix: move session-end hooks from Stop to SessionEnd

Affaan Mustafac3f1594acdfd
diff --git a/hooks/hooks.json b/hooks/hooks.json
index b09b5bb1d..3cc131459 100644
--- a/hooks/hooks.json
+++ b/hooks/hooks.json
@@ -128,8 +128,10 @@
"command": "#!/bin/bash\n# Final check for console.logs in modified files\ninput=$(cat)\n\nif git rev-parse --git-dir > /dev/null 2>&1; then\n modified_files=$(git diff --name-only HEAD 2>/dev/null | grep -E '\\.(ts|tsx|js|jsx)$' || true)\n \n if [ -n \"$modified_files\" ]; then\n has_console=false\n while IFS= read -r file; do\n if [ -f \"$file\" ]; then\n if grep -q \"console\\.log\" \"$file\" 2>/dev/null; then\n echo \"[Hook] WARNING: console.log found in $file\" >&2\n has_console=true\n fi\n fi\n done <<< \"$modified_files\"\n \n if [ \"$has_console\" = true ]; then\n echo \"[Hook] Remove console.log statements before committing\" >&2\n fi\n fi\nfi\n\necho \"$input\""
}
],
- "description": "Final audit for console.log in modified files before session ends"
- },
+ "description": "Check for console.log in modified files after each response"
+ }
+ ],
+ "SessionEnd": [
{
"matcher": "*",
"hooks": [