Fixed
- Code Execution Hook Failure - Fixed session-start hook falling back to MCP tools instead of using fast Code Execution API
- Root Cause 1: Invalid
time_filterparameter passed tosearch()function (API signature only acceptsquery,limit,tags) - Root Cause 2: Python
transformerslibrary emittedFutureWarningto stderr, causingexecSync()to fail - Root Cause 3: Installer used system
python3instead of detecting venv Python path - Fix 1: Removed time_filter parameter from Code Execution queries (line 325 in
claude-hooks/core/session-start.js) - Fix 2: Added
-W ignoreflag to suppress Python warnings during execution (line 359) - Fix 3: Updated installer to use
sys.executablefor automatic venv detection (claude-hooks/install_hooks.py:271-299) - Impact: 75% token reduction per session start (1200-2400 tokens → 300-600 tokens with Code Execution)
- Behavior: Hook now successfully uses Code Execution API instead of falling back to slower MCP tools
- Documentation: Added memory with troubleshooting guide for future reference
- Location:
claude-hooks/core/session-start.js:315-363,claude-hooks/install_hooks.py:271-299
- Root Cause 1: Invalid
Changed
- Session-Start Hook Connection Timeout - Increased quick connection timeout from 2s to 5s
- Prevents premature timeout during memory client initialization
- Allows more time for HTTP server connection during high-load periods
- Location:
~/.claude/hooks/core/session-start.js:750(user installation)
Fixes: #264
🤖 Generated with Claude Code