Claude Code hook

Sondera Coding Agent Hooks

Hooking implementations and supporting tools for various coding agents (Claude, Cursor, Gemini, etc)

231 stars 33 forksHooks Source

Install

From source
git clone https://github.com/sondera-ai/sondera-coding-agent-hooks.git

From 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.…
Read the full README on GitHub

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.
Claude Code docs

Details

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

Browse the most popular Claude Code mods, all hooks, or the skills and MCP server directories.