kosa8 docs Dashboard
esc
↑ ↓ move↵ openRuns in your browser; nothing you type is sent anywhere.

CLI / hooks

kosa8 hooks

Check coding agents' tool calls before they run (Claude Code, Cursor, Codex, Gemini, Copilot)

Puts kosa8's tool-call rules in front of the coding agents running on this machine (not in a sandbox). Before the agent runs a shell command, reads or writes a file, calls an MCP tool or fetches a page, kosa8 decides: allow, deny with the reason, or ask you. Every decision, and every session start and end, goes in the signed audit log (kosa8 audit ls, the desk's Agent hooks panel).

kosa8 hooks install claude-code     the hook in ~/.claude/settings.json
kosa8 hooks install cursor          the hook in ~/.cursor/hooks.json
kosa8 hooks install codex           the hook in ~/.codex/hooks.json
kosa8 hooks install gemini          the hook in ~/.gemini/settings.json
kosa8 hooks install copilot         the hook in ~/.copilot/hooks/kosa8.json
kosa8 hooks policy                  the organization's policy (--org), as cached
kosa8 hooks status                  what is installed, and whether kosa8d answers
kosa8 hooks test                    send sample calls through the installed hook
kosa8 hooks log                     the latest decisions
kosa8 hooks uninstall               take kosa8's entries out again

--mode sandbox also moves the agent's shell commands into a kosa8 sandbox with the project folder mounted, instead of running them on this machine. --cloud records every decision in your kosa8 Cloud organization's audit log and sends agent.tool_call.blocked webhooks. --org decides with your organization's central policy from kosa8 Cloud (cached, refreshed every few minutes, used offline); --org --forward-audit also has kosa8d send each decision's metadata to the organization's Cloud audit log and SIEM.

Plans: hooks on this machine are part of Solo and up; --cloud is part of Team and up.

The hook fails closed: if kosa8d is not running, every checked call is refused with a message saying so. Start it with kosa8 daemon start.

Example#

  kosa8 hooks install claude-code
  kosa8 hooks status
  kosa8 hooks log

Subcommands#

The kosa8 weekly

Agent security news, one industry deep-dive and a hands-on challenge, every Monday. Unsubscribe in one click.

© 2026 kosa8 · kosa8.com · Zero Trust cybersecurity infrastructure for AI agents · Local models served by llamay · Agent gateway: MAQPNA