Show HN: A police department for your Claude Code agents Agent-PD, a new open-source tool, installs a logging hook into Claude Code that records every tool call and permission event from the main agent and all its subagents. The tool's CLI replays those logs through six deterministic detectors to report rule violations with quoted evidence, functioning as a catch-and-report system that never blocks agent actions. The project aims to provide forensic oversight for AI coding agents, addressing the gap where denied permission calls are typically invisible in standard transcripts. A logging-only hook records every tool & permission event from the main agent and its subagents; the pd CLI replays that log through six detectors and reports rule offenses with quoted evidence. Catch-and-report — it never blocks. Quickstart · · How it works how-it-works-mental-model · Detectors the-detectors · Architecture https://github.com/varmabudharaju/agent-pd/blob/master/ARCHITECTURE.md Security https://github.com/varmabudharaju/agent-pd/blob/master/SECURITY.md The department's body-cam. agent-pd won't stop the heist — but every move your agents make ends up on the record. Flight recorder + police scanner, not a firewall.If you need tostopan action, that stays with Claude Code's permission prompts or an OS sandbox. agent-pd tells you what an agent did — faithfully, after the fact or live as it happens. Highlights Covers the main agent + every subagent , including those spawned by Claude Code's new dynamic Workflow tool verified against recorded workflow-subagent hook events . Six deterministic detectors at zero token cost — denied calls, out-of-scope & credential access, permission bypass, self-permissioning, disallowed tools, off-task work. Tamper-evident audit log hash-chained with an optional off-host append-only sink . Sessions are named, not UUIDs — pd list and pd watch show each session's project directory and first user prompt, derived from data already in the logs works retroactively . Honest by design — it raises the bar; it is not a sandbox. See SECURITY.md https://github.com/varmabudharaju/agent-pd/blob/master/SECURITY.md . What it looks like — pd watch --all across three concurrent sessions three projects, main agents + subagents with their briefs, two genuine flags and one borderline search among the ordinary work : Every screenshot in this README is a real Terminal capture of the real engine replaying a seeded three-session fleet — reproduce them yourself with . examples/demo-sessions.sh Claude Code agents can read files, run shell commands, and spawn subagents. Most of that is fine — but you usually find out what an agent actually did only by scrolling a transcript, and denied calls never reach the transcript at all Claude Code kills them first . agent-pd installs a hook that records every event to a per-session audit log, then gives you tools to ask: did any agent go out of scope, touch credentials, try to escalate, edit its own config, use a tool it wasn't allowed, or wander off its brief? SETUP CAPTURE automatic, every session READ per session or --all pd install-hook → hook fires on every tool call → pd report forensic │ │ pd watch live scanner settings.json ~/.claude/pd/audit/