Claude Code hook
Sondera Coding Agent Hooks
Hooking implementations and supporting tools for various coding agents (Claude, Cursor, Gemini, etc)
Install
git clone https://github.com/sondera-ai/sondera-coding-agent-hooks.gitFrom the README
Coding Agent Hooks by Sondera Released as part of the *Hooking Coding Agents with the Cedar Policy Language* talk at Unprompted 2026, and updated for presentation at Black Hat Arsenal 2026 and the Vegas AI Security Forum '26. See also our ICML 2026 *Agents in the Wild* workshop paper: arXiv:2606.26649. A reference monitor for AI coding agents. Rust hook binaries and Cedar policies intercept every shell command, file operation, and web request to forbid exfiltration and destructive behaviors, and enforce information flow control. YARA signatures and Cedar policy evaluation are deterministic. The optional LLM-based classifiers (data sensitivity, secure code policy) are probabilistic and configurable in .sondera/sondera.toml — see Configuration. Works with Claude Code, Cursor, GitHub Copilot, and Gemini CLI, plus adapters for Antigravity, Codex, Hermes, OpenCode, OpenHands, and VS Code — sondera hook --help lists the full set. A hook adapter normalizes its agent's event and forwards it over gRPC to sondera serve, which combines deterministic signature scanning with Cedar policy evaluation and returns Allow, Deny, or Escalate. If the harness cannot be reached, enforcement hooks fail closed. Enforcement at a glance What each adapter can do with a decision, by hook group — block (deny, fail-closed), ask (escalate to the host's approval UI), steer (inject context), redact (replace tool output), terminate (stop the loop), *observe* (recorded only): Terms, the per-event matrix behind each cell, and the caveats it compresses are defined in crates/hooks/README.md. Quick start Download the archive for Linux x86-64 or Apple silicon from Releases, or build from source with Rust and Cargo. Then: Installed from an archive, those commands are ./sondera serve, and so on.…
How hooks work
- Hooks are shell commands Claude Code runs at fixed points: before or after a tool call, when you submit a prompt, when Claude stops, on notifications and at session start.
- They are set in the hooks section of ~/.claude/settings.json (or .claude/settings.json for a project), or come bundled in a plugin.
- A hook can block a tool call, add context, or run a formatter or test. Read the scripts before you install them: they run on your machine with your permissions.
Details
- Repository
- sondera-ai/sondera-coding-agent-hooks
- Type
- Hooks
- Language
- Rust
- License
- MIT
- Last updated
- 27 October 2026
FAQ
What is Sondera Coding Agent Hooks?
Hooking implementations and supporting tools for various coding agents (Claude, Cursor, Gemini, etc) It is a hook for Claude Code, from sondera-ai/sondera-coding-agent-hooks on GitHub.
How do I install Sondera Coding Agent Hooks?
Clone sondera-ai/sondera-coding-agent-hooks from GitHub and follow the setup steps in its README.
Is Sondera Coding Agent Hooks popular?
sondera-ai/sondera-coding-agent-hooks has 231 GitHub stars and 33 forks. It was last updated on 27 October 2026.
More hooks
Claude Code Crash Course
191emarco177/claude-code-crash-course
Hands-on crash course for Claude Code with branch-based projects on MCP, subagents, hooks, and automation.
Codex Skill
226cathrynlavery/codex-skill
Give Claude Code a second opinion using OpenAI Codex - automatic plan review via hooks
jev-guard
144leepokai/jev-guard
Risk-scores each tool call with session context and decides to allow, ask or deny.
Kim Service
177KimYx0207/Kim_Service
面向 Claude Code、Codex 等 AI 编码助手的 Hook 与 Agent Skill 开源合集。
Claude Hooks SDK
68beyondcode/claude-hooks-sdk
PHP library for building Claude Code hooks with a fluent API.
Claude Code Blueprint
119Aedelon/claude-code-blueprint
Production-grade Claude Code configuration: skills, agents, hooks, rules, and permissions working as a system.
Browse the most popular Claude Code mods, all hooks, or the skills and MCP server directories.