fix: hook commands fail - stdin JSON not parsed (upstream #1061)#6
fix: hook commands fail - stdin JSON not parsed (upstream #1061)#6
Conversation
…stdin JSON Claude Code passes hook context as JSON via stdin, not as shell environment variables. All generated hook commands referenced nonexistent variables like $TOOL_INPUT_file_path, $PROMPT, $TOOL_SUCCESS, etc., causing every hook (PreToolUse, PostToolUse, UserPromptSubmit, SessionStart, Notification) to silently fail with empty arguments. The fix introduces .claude/hooks/hook-bridge.sh, a bridge script that reads the stdin JSON with jq, extracts the relevant fields, and forwards them as proper CLI arguments. All hook commands in settings.json and the settings-generator now route through this bridge script. Changes: - Add .claude/hooks/hook-bridge.sh bridge script - Update settings-generator.ts to emit bridge-based hook commands - Update static .claude/settings.json template - Update executor.ts to create .claude/hooks/ dir and copy bridge on init Co-Authored-By: claude-flow <ruv@ruv.net> (cherry picked from commit f8d16a4)
|
Warning Rate limit exceeded
⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ✨ Finishing touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
🔗 Integration Test Results🔗 Cross-Agent Integration Test ReportSession ID: integration-20260206-223950-aed6e40e4c62aecea54c362a820542573303af2f Summary
Test Results
Recommendations
Next Steps
Generated by Cross-Agent Integration Test Pipeline |
Replica upstream
Questa PR ricrea nel fork la fix upstream:
Contenuto
.claude/hooks/hook-bridge.shMetodo
Cherry-pick del commit upstream
f8d16a4d48622f215bda1824e5977008f921e0e5(con-x).Nota operativa
Il bridge usa
jq; verificare presenza dijqnegli ambienti target.