How to audit what Claude Code does
The short answer
Claude Code exposes lifecycle hooks (PreToolUse, PostToolUse, Stop). Scopebond uses them to see every tool call (a shell command, a file edit, a git push, an MCP call) and gives each one a signed record. A record carries the action (a command as a scrubbed prefix), the rule that decided it and cryptographic fingerprints, never file contents or prompts. You read the records in your workspace, and each one can be checked offline.
Turn on protection
Install Scopebond (see Get started). In a workspace, force-pushes to protected branches, secret-file reads and changes to Scopebond itself are blocked from the start; every other rule starts in Monitor, so you see what it would block before you switch it to Block.
Read the record
Every action shows in your workspace's Activity with the rule that decided it. Each record is signed on the computer that decided, so anyone can check it offline, with no network and no account.
What's in a record
- The action (for example
shell.exec,git.push,file.write). - The rule that decided it and whether it was allowed or blocked.
- The action's details and fingerprints: a command is kept as a scrubbed prefix plus a fingerprint, alongside file paths and the working folder. Never the file contents or the prompt.
- Common secret shapes are removed before anything is signed. This is best effort: a secret typed into a command can still be recorded.
Good to know
What this does not do
Scopebond checks the actions Claude Code sends through its own tool system. A process a person starts outside the agent is not covered. A valid signature shows what the computer recorded and that the record was not changed; it does not by itself show an outside result. If the coding tool cannot start Scopebond's check, the action runs unchecked, and the Scopebond app on the computer reports it.
Alternatives
- Claude Code's own settings and Compliance API — native managed settings and audit export; Scopebond adds a signed record you can check offline and one set of rules across tools.
- CrowdStrike Falcon AIDR — protects Claude Code from attacks; Scopebond adds your own rules across coding tools and a signed record.
Questions
Does Scopebond see my code or my prompts?
No. It checks the action an agent tries to take against your rules, not the content it is working on. Records carry the action's details (a scrubbed command prefix, file paths) and fingerprints, never file contents or prompts. Common secret shapes are scrubbed before anything is written, on a best-effort basis.
Can I check a record without Scopebond?
Yes. Each record is signed with Ed25519 on the computer that decided, and the open-source tools in the @scopebond/hook package check it offline against that computer's public key. A signature shows a record was not changed; it cannot show that none was removed.
How should we roll it out?
Start with one team or project. Force-pushes to protected branches and secret-file reads are blocked from the start; every other rule starts in Monitor, so you see what it would block before you switch it to Block, then widen it to everyone.