From 37d71359e0e415efd61b74b3c4a548102c4c8b6b Mon Sep 17 00:00:00 2001 From: rabbitblood Date: Thu, 16 Apr 2026 13:18:17 -0700 Subject: [PATCH] fix: enforce LF for .py hook files to fix #507 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit CRLF line endings in .claude hook files caused claude-code SessionStart hooks to fail silently on Windows checkouts — python3 received a filename ending in '\r' (e.g. 'session-start-context.py\r'), failed with ENOENT, and the claude-code query short-circuited with result='' across every A2A call. Observed symptom: all 22 agents returned '(no response generated)' on every pulse despite the model never being called (input_tokens=0, output_tokens=0). Existing *.sh rule covered the shebang line; adding *.py covers the Python hook target that the shell script invokes. Shipped alongside the same fix in molecule-ai-plugin-molecule-session-context (which is the primary source of these hooks via the platform plugin loader). Fixes #507 Co-Authored-By: Claude Opus 4.6 (1M context) --- .gitattributes | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.gitattributes b/.gitattributes index a3772a93..90236b24 100644 --- a/.gitattributes +++ b/.gitattributes @@ -3,6 +3,12 @@ *.sh text eol=lf workspace-template/entrypoint.sh text eol=lf +# Python hook files are invoked by .sh hooks with path substitution; +# CRLF in either the .sh OR the .py file breaks the hook dispatch. +# See Molecule-AI/molecule-core#507 — SessionStart hook failed silently, +# agents returned "(no response generated)" on every A2A call. +*.py text eol=lf + # Dockerfiles and compose files are parsed by tools that tolerate CRLF, # but keep LF for consistency across platforms. Dockerfile text eol=lf