Commands / kosa8 hooks
kosa8 hooks
Check Claude Code's and Cursor's tool calls on this machine before they run
Puts kosa8's tool-call rules in front of Claude Code and Cursor 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 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.
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.
Subcommands
kosa8 hooks installInstall kosa8's hook into Claude Code or Cursor
kosa8 hooks logShow the latest decisions the hooks made (from the audit log)
kosa8 hooks sandbox-runRun one shell command in the project's kosa8 sandbox (what sandbox mode rewrites commands to)
kosa8 hooks statusShow where kosa8's hook is installed, and whether kosa8d is answering
kosa8 hooks testSend sample tool calls through the installed hook and show kosa8's answers
kosa8 hooks uninstallTake kosa8's hook out of Claude Code or Cursor (both when none is named)