Safety rails run on every allow an agent gets from a check, since each one is an action it was cleared to take. Batch checks and dry runs are not counted. What a rail catches is recorded as an audit event, lands in the monitors inbox, and, for loops, pauses and decoys, is sent to the agent's alert channels.
| Rail | What it catches | Page |
|---|---|---|
| Budget | More allowed actions in a window than you set | This page |
| Loop detection | The same permission on the same object over and over in one task | This page |
| First-use review | The first time an agent is allowed a permission | This page |
| Tool drift | A tool definition that changed since it was first seen | Tool drift and decoys |
| Decoy tools | A call to a tool no legitimate task uses | Tool drift and decoys |
| Requester only | An action on someone other than the person who asked | Requester only |
| Session trust | Not a block: lets a cleared call repeat in one conversation | Session trust |
| Content guard | Redacts secrets and personal data, and catches prompt injection in tool results. A harness guard. | Harness |
Settings#
Budget, loop and alert settings live on the agent, in settings. Set them when you register the agent or with PATCH /v1/apps/:app_id/authz/agents/:slug.
curl -X PATCH https://api.scute.io/v1/apps/$SCUTE_APP_ID/authz/agents/billing-assistant \ -H "Authorization: Bearer $SCUTE_APP_SECRET" \ -H "Content-Type: application/json" \ -d '{ "settings": { "budget": { "max_actions": 200, "window_minutes": 60, "permissions": { "invoice:refund": 10 } }, "loop": { "limit": 20, "window_minutes": 10, "mode": "enforce" }, "alert_channel_ids": ["TEAM_CHANNEL_ID"] } }'Out-of-range values are a 422 with a message naming the setting.
Budgets#
A budget needs max_actions or permissions, or both. Windows are fixed clock slots of window_minutes, counted per agent across all its tasks.
Going over pauses the agent:
- The check that went over answers deny with budget_exceeded, and the say line "I've been paused for a safety check, so I can't do that right now. A person will follow up."
- The agent is suspended with the reason Over budget: ..., and every open task ends.
- A paused item lands in the monitors inbox and a critical alert goes to the agent's channels.
A person has to resume the agent.
Loop detection#
Loop detection is always on with the defaults. It counts allows of the same permission on the same object within one task. The first allow over the limit records the audit event app.authz.agent.loop_detected, puts a loop item in the inbox and sends a warning alert. In enforce mode every allow over the limit becomes deny with loop_detected.
First-use review#
The first time an agent is allowed a permission, Scute adds it to the agent's seen_permissions, records app.authz.agent.first_use, and puts a first_use item in the inbox. The action itself goes ahead.
Alert channels#
alert_channel_ids lists team channels of the app's workspace that get the agent's alerts. A channel from another workspace is a 422. Without channels, catches still go to the inbox and the audit log.
Counters live in the cache
Budget and loop counters are kept in Scute's cache. If the cache is unavailable, counts read as nothing and no budget or loop trips.