Skip to content
Agentic Control Plane
Quick-start series · Part 1 of 1
Control in Three Minutes →

Log and Control Every Claude Code Tool Call in 60 Seconds

David Crowe David Crowe · · 4 min read
claude-code governance tutorial hooks
Share X HN LinkedIn

Claude Code reads your files, writes code, runs shell commands and makes web requests. Out of the box, nothing records what it did. There is no log you can search later and no rule that stops a bad command.

One install command fixes that. Every tool call gets logged, and rules can allow it, hold it for your approval, or block it. This post shows what the command sets up and what you see afterward.

Install

# Free, on-device, no account. Decisions run locally from ~/.acp/policy.json:
curl -sf https://agenticcontrolplane.com/install.sh | bash -s -- --local

The installer does three things:

  1. Writes a hook script to ~/.acp/govern.mjs.
  2. Registers it in Claude Code’s ~/.claude/settings.json.
  3. Writes the local decision engine (~/.acp/decide.mjs) and your policy (~/.acp/policy.json). Every call is logged to ~/.acp/audit.jsonl.

Nothing leaves your machine. Restart with claude --continue and every tool call goes through the hook. Local mode only covers some harnesses. If the installer finds nothing it can govern locally, it tells you to re-run without --local.

Want shared team rules, verified identity and the cost X-ray? Run the same command without --local. The installer opens your browser to set up a workspace.

curl -sf https://agenticcontrolplane.com/install.sh | bash

What the hook does

Claude Code lets you register a command that runs before every tool call: Bash, Read, Write, Edit, Grep, WebFetch, Agent, and MCP tools. The command gets the call details and answers allow or deny.

The ACP hook sends the tool name, its input and the session ID to a decision engine. With --local that engine is on your machine. In a workspace it is ACP’s API. If the answer is deny, Claude Code sees the reason and tries a different approach.

Tiers

Claude Code calls differ in risk. You are watching an interactive session. A subagent or a background job runs without you. ACP tags each call with a tier (interactive, subagent, background or API) so rules can treat them differently. A write to /etc/hosts from an unattended background job is a different matter from the same write when you are at the keyboard.

What you see in the dashboard

With a workspace, every call shows up at cloud.agenticcontrolplane.com/activity:

  • The tool name and a preview of the input (file path, command, URL)
  • The decision: allowed, held, or denied
  • Which client it came from
  • The tier
  • How long the check took

You can filter by tool, decision, client or time. With --local, the same record is the audit.jsonl file. It is a plain file on your machine, so treat it as a record, not as tamper-proof evidence.

Audit mode and enforce mode

A new workspace starts in audit mode. Every call is recorded and your rules do not block anything yet. The safety floor still applies. It holds force-push, destructive SQL through a database client, curl | sh, and deletes outside the project until you approve. It always blocks rm -rf of your home or root, mkfs, disk wipes and fork bombs. You see held calls inline in Claude Code.

Run /acp-enforce or use the Policies page to turn your own rules on. A deny from a rule then blocks the call before the tool runs.

If ACP can’t be reached

The Claude Code plugin fails open for interactive sessions. The call runs, and a loud “UNGOVERNED” banner tells you the check did not happen. Subagent, background and API sessions fail closed and stay blocked until ACP answers. A gateway outage never bricks your own terminal, and unattended agents never run unchecked.

The shared hook that other harnesses use fails open in every tier unless you set ACP_FAIL_MODE=closed or run echo closed > ~/.acp/failmode.

For teams

On your own you get a log and basic rules. With a workspace you invite teammates, see everyone’s activity in one place, and set rules that apply to all of them. A new developer who installs the plugin is covered by the team’s rules from their first call.

The hook runs on the developer’s machine. A user who turns off Claude Code hooks turns ACP off too, so this is a record and a guardrail, not a lock the user can’t remove.

Try it

curl -sf https://agenticcontrolplane.com/install.sh | bash -s -- --local

It takes about 30 seconds and needs no account. Drop --local when you want a team workspace.

To see how many tools a Claude Code session can call, read the Tool Surface Index. It lists 76, grouped by how much damage each can do. Which tools to deny out of the box covers the default rules.

View the dashboard →

Running Claude Code? One command adds a hook. Each tool call is recorded, the session's model calls are priced, and a force-push, destructive SQL or curl | sh waits for your OK in the session.

macOS · Linux · WSL
curl -fsSL https://agenticcontrolplane.com/install.sh | bash
Windows · PowerShell
irm https://agenticcontrolplane.com/install.ps1 | iex

What the installer writes  ·  Claude Code guide  ·  free up to 5 agents

Share X HN LinkedIn
Get the next data drop
What agents actually cost, new tool-surface captures, and the occasional incident post-mortem — sent when we publish something worth your inbox, not on a schedule. Unsubscribe anytime.
Share: Twitter LinkedIn
Related posts

← back to blog