HerdbellBlog

Guide

Who should approve an AI coding agent's permissions, and how to prove who did

By the Herdbell team · Published · Updated

Short answerWho should approve an AI coding agent's permission requests, and how to keep a record that shows who approved what, using hooks, transcripts and git.

When an AI coding agent asks to run a command, someone has to say yes or no. Once more people use agents, two questions follow: who should that person be, and how do you show later who approved what? This page gives a simple answer for developers and small teams.

Who should approve

  1. The person who started the agent. They know the task and can judge whether a command fits it. This is the default for almost everyone.
  2. Never the agent itself. Turning approvals off means nobody approves. Keep that for throwaway environments only. See why skipping permissions is risky.
  3. A second person for anything outside the project: production, shared databases, secrets or spending money. A human review on the pull request is the usual place for that.

Decide what needs approval in advance

Most agents let you set rules ahead of time: commands that are always allowed, always denied, or always asked about. Write those rules down and keep them in the project, so everyone on the team works the same way.

  • Always allow: safe, read-only commands such as running tests or listing files.
  • Always ask: anything that installs, deletes, pushes or reaches the network.
  • Always deny: commands that touch secrets or production.

How to prove who approved what

There is no single built-in audit trail, but three records you already have get you most of the way:

  • The agent's transcript. Claude Code saves each session as a file in ~/.claude/projects/, including every tool call the agent made.
  • A logging hook. A hook is a small command the agent runs at set moments. A PreToolUse or PermissionRequest hook can append the time, the user and the command to a log file. See Claude Code hooks, explained.
  • Git. Commits and pull request reviews show who accepted the agent's changes.

For a team, keep the log somewhere the agent cannot edit, and tie it to the person's login on that machine.

Make approving fast, so nobody turns it off

People turn approvals off when the prompts get in the way. Herdbell keeps them on but makes them quick: when Claude Code, Codex or Cursor asks, a card appears at your cursor in any app, and you press Return to allow or D to deny. Commands you approve with Always allow are listed in Settings → Approvals, where you can remove them. See how to approve Claude Code permissions without switching windows.

Common questions

Who should be responsible for approving AI agent permissions?

The developer who started the agent, because they know the task. Anything that reaches beyond the project, such as production or secrets, should also need a second person.

How do you prove who approved an AI agent's access?

Combine the agent's transcript, a hook that logs each permission request with the time and user, and git history showing who accepted the changes.

Should I let an AI agent approve its own commands?

Only in a throwaway environment you can restore. Anywhere else, keep a person in the loop and make approving quick.

What tools help control and monitor AI coding agents?

The agents' own permission rules and hooks, git and pull request reviews, and a monitor such as Herdbell that shows every agent and lets you answer requests from one place.