PeakWatch · Research

Human-in-the-loop agents: why the approval gate is the safety feature, not the friction

Coding agents that ask before they write, run or delete are safer by design. What permission gates protect against, why auto-approve is a trap, and how to keep the gate without the desk.

By the upeak team3 min read2 sources
WRITE WANTS TO RUN src/relay/backoff.ts ALLOW DENY One tap on the wrist; the agent is moving again

Key takeaways

  • Permission gates are the primary control for tool-using agents; the default for side effects is to ask.
  • Auto-approve keeps the agent's error rate and removes your chance of catching it.
  • Make answering cheap (arguments visible, deny on timeout, ask on the wrist) rather than removing the gate.

The temptation with a capable coding agent is to switch off the questions. Every 'yes' feels like friction. The permission gate is the one part of the system whose job is to be in the way, and the research and the incident reports both say to keep it.

What the gate protects against

An agent with tool access can write files, run commands, install packages and call APIs. Most of the time it should. Occasionally it will try to write outside the project, run a destructive command it misread as safe, or act on instructions that arrived inside a file it was asked to read. Anthropic's own guidance for Claude Code treats tool permissions as the primary control: the agent proposes, the human disposes, and the default for anything with side effects is to ask.

Why auto-approve is a trap

Blanket approval converts a supervised system into an unsupervised one without changing anything visible. The agent's error rate does not change; your chance of catching an error goes to zero. The failures are rare, which is exactly what makes them expensive: a deleted directory or a leaked credential is a bad day, and the gate exists for that day, not the other ninety-nine.

Making the gate cheap instead of removing it

The reason people switch the gate off is that answering is expensive: it needs the terminal, the laptop and you at the desk. The fix is to make answering cheap. Show the arguments, not just the tool name, so the decision is obvious. Deny automatically on timeout so nothing runs because you were away. Put the ask somewhere you already are.

How PeakWatch keeps it

PeakWatch never auto-approves. Each request shows the tool, its arguments and the SDK's reason; you tap Allow, Deny, or Say why. The amber ring on the bezel drains for sixty seconds and then the relay denies on your behalf. The relay pairs with a single bearer token carried in a subprotocol so it never lands in a proxy log. The gate stays; the desk does not.

PeakWatch is built for this

Your coding agent, on your wrist. Coming soon, free during the beta.

Explore PeakWatch

Questions

What if I trust the agent with my repository?
Trust the agent inside the working directory; keep the gate for writes outside it, installs, network calls and anything destructive.
Does a timeout deny slow the agent down?
It pauses it, which is the right behaviour for an action nobody approved. Most requests are answered within seconds from the wrist.
Can I approve a tool permanently?
Yes, with Always, per tool and per session, for things you have decided are safe.

Sources

  1. Anthropic. Claude Code permissions and tool-use security documentation. https://docs.claude.com/en/docs/claude-code/security
  2. Anthropic. Claude Agent SDK overview. https://docs.claude.com/en/api/agent-sdk/overview