I Built 11 Claude Code Hooks. Six Were Dead Within 24 Hours.
Dev.to AI
•
Generative AI
I had one hook on Claude Code. One. A TypeScript checker that ran npx tsc in a project that uses Bun, and piped the output through head -20. So when there were 12 errors, I saw three. Great system. Meanwhile, my agent could force-push to main, leak my API keys, and rm -rf the repo without anything stopping it. Where I lost it was when it deployed to prod on the SaaS. I had explicitly told it not to. It did it anyway. I write about Claude Code best practices. My own setup had none.