Skip to content

ToolApproval and AgentRun

ToolApproval

When an agent calls a tool listed in requireApproval, the gateway holds the call and creates a ToolApproval (short name tap) in the agent’s namespace, with the pod, server, tool, arguments and expiry.

Terminal window
$ kubectl get tap -n agents
NAME DECISION SERVER TOOL POD EXPIRES AGE
merge-pull-request-x7k2p github merge_pull_request claude-agent-0 4m 12s

Decide it with kubectl leash, with Slack’s buttons, or by setting spec.decision yourself:

Terminal window
kubectl leash approve merge-pull-request-x7k2p -n agents
kubectl leash deny merge-pull-request-x7k2p -n agents --reason "not on a Friday"

A decision is final, and nobody can edit the request. If nobody decides before the policy’s approvalTimeout (default 5m), the call is refused.

AgentRun

One AgentRun (short name arun) per agent pod, named after it:

Terminal window
$ kubectl -n agents get arun
NAME POLICY POD PHASE TOKENS MODEL CALLS TOOL CALLS DENIED LAST ACTIVITY
claude-agent-0 claude-agent claude-agent-0 Running 48210 37 12 2 40s

It holds tokens, model and tool calls, refusals and approvals, the models and tools used, and the last refusal with its reason. It is Running while the pod exists, then Completed, and is deleted after 7 days (audit.runRetention). More in Audit trail and dashboards.