ai newsDo., 15. Okt.
EilmeldungAlibaba Qwen N1 AI glasses go on sale in China

So sperrt der Autor 18 Claude Code Agents von main-Branches und Secrets aus

Mit Claude Code Mods lässt sich jedes Agent-Ereignis vor der Ausführung abfangen: Ein Hook kann die Aktion freigeben, anpassen oder blockieren. So stellt der Autor sicher, dass keine der 18 Agents auf sieben Repos auf main pushen oder auf Secrets zugreifen kann.

dev.toDonnerstag 17:00 · 15.10.DE1 Min. Lesezeit
Bild: dev.to

18 AI agents. 7 repos. Now none of them can push to main, touch a secret, or wander into another repo. Claude Code Mods made that possible. Every time Claude is about to act, it fires an event first. Your hook runs before the action and can let it through, change it, or block it.

An edit outside its worktree pauses and asks me. No answer means refused.

It checks the current branch and denies git push on main, even if a permission rule allows it.

It blocks any read or edit of.env, keystores or.p8 files.

Every prompt gets the repo, branch and ticket number added. No more repeating myself.

It logs token usage and cache hits on every model call.

When a hook blocks something, Claude reads the reason and changes approach instead of just failing.

If a hook crashes, Claude Code skips it and runs the action anyway. Add a.catch that denies. CLAUDE.md says what you want. Mods decide what's allowed.

Expand Manoj Kumar Kagitha Manoj Kumar Kagitha Manoj Kumar Kagitha Follow Senior Cloud and AI Engineer in Dallas, TX. 9+ years across Azure, GCP, and AWS. Leading API architecture currently. I write about LLM platforms, agentic AI, and production ML systems. Location Dallas, TX Education California State University, Fullerton Work Sr Cloud Engineer Joined Sep 30, 2026 • Oct 15 Dropdown menu Copy link Hide The crashed-hook gotcha is the part worth the read. A safety control that silently fails open is worse than no control, so the.catch that denies is the most important line in the whole setup.

Originaltitel: How I stop 18 Claude Code agents from pushing to main or touching secretsQuelle: dev.to (dev.to). Original öffnen