Claude Code with AgentFox
what gets checked, and where
Three hooks and a background daemon. Every prompt, tool call and tool result is checked in milliseconds, the shell rules refuse the dangerous commands from day one, and everything else starts in Watch.
Three lines
Everything starts in Watch: nothing is stopped until you switch a library to Block.
agentfox admin hooks install --agent claude-dev --write # writes .claude/settings.json agentfox init # turns on the coding-agent rules, in Watch agentfox admin hooks daemon # keep it running; hooks ask it
What gets checked
Each row is a check that runs in your process, before the thing it checks happens.
| Checked | How |
|---|---|
| Shell commands | curl … | sh, cat .env, rm -rf ~, git reset --hard, terraform apply, npm publish and turning AgentFox off are refused from the start, whatever the grants say |
| Every other tool call | Authorised against the agent's grants; built-in tools are granted at install so ordinary work is not refused |
| MCP tools | Arrive as mcp__server__tool with no grant, so they are refused until granted; grants can be proposed from a few sessions' traffic |
| Prompts and tool results | A refused prompt never reaches the model; a tool result carrying injected instructions is handed to the agent marked as data |
Found in the code by agentfox scan: agentfox scan machine reads Claude Code's own config for the MCP servers it loads, and agentfox scan mcp the .mcp.json and .claude/settings.json in a repository. The scan reads the repository and runs nothing, so it works before any of the lines above are added.
- The hooks check against this machine's database and record there, not in your account, so the sessions do not appear in the dashboard.
- If the daemon is down the hook allows the call and prints a warning; check agentfox admin hooks status before relying on it.
Where to go from here
Claude Code and Codex: install the hooks, grant the tools, switch to Block Tool access: which tools the agent may call What the checks catch, with their limits Every framework
Try AgentFox on your own agent
One command finds your agents. It starts in watch mode, so nothing is blocked until you say so.
uvx agentfox scan