Skip to main content
Before each tool call, levanto hook asks Sage whether the call changes, deletes or sends something you didn’t ask for, such as deleting a file because a README told the agent to. Looking around the project and running tests or builds don’t count. Add it to a project:
The hook reads LEVANTO_API_KEY from the agent’s environment, or from .env in the project. Calls it doesn’t flag go through your agent’s usual permission checks.
  • Claude Code: --shared writes the team’s .claude/settings.json instead. The Claude Agent SDK loads the same settings.
  • Codex: runs project hooks only after you trust them with /hooks.
  • Goose: loads the hook when you start goose in the project.
If Sage can’t be reached, the call goes ahead and you see a warning.

Options

Pass them to hook install, and run it again to change them. To check other tools, change matcher in the file it writes.

What it sends

Each check sends Sage the conversation and the pending call: your messages, the agent’s replies, its tool calls and their output, trimmed to the latest part. Goose doesn’t give hooks the conversation, so for Goose the hook keeps your prompts and the agent’s replies in a private temporary file until the session ends. To build the same check into your own agent, see Guard tool calls. Source: github.com/levantolabs/levanto-cli.