Why duration is a weak signal
Duration alone does not separate a runaway AI agent from a long-running task. A legitimate task can run for a long time and still stay inside its declared scope, budget, permissions, and tools while making measurable progress. A runaway agent is identified by what it does during the run, not by how long the run has lasted.
For this reason, controls should be built around behavior measured against a declared envelope, and responses should contain a misbehaving agent without discarding valid work.
Observable differences between the two states
The two states can be compared along the same dimensions. In each row, the legitimate task stays inside its envelope and advances toward its goal, while the runaway agent does not.
| Dimension | Legitimate long-running task | Runaway agent |
|---|---|---|
| Scope | Stays inside its declared scope | Drifts beyond its scope |
| Actions | Takes actions that change task state | Repeats actions |
| Permissions | Uses only its declared permissions | Expands its permission use |
| Resources | Consumes resources within its declared budget | Consumes resources without advancing state |
| Progress | Shows measurable progress toward its goal | Shows no state change that moves toward the goal |
Runtime signals to instrument and how to set thresholds
Capture the following signals for each agent run and evaluate them against the task's declared envelope.
- Tool-call patterns: which tools the agent calls, and whether they fall within the tool allowlist declared for the task.
- Repeated actions: the same actions recurring without a change in task state.
- Token or cost use: consumption measured against the declared budget.
- Permission use: whether the agent's use of permissions stays within what was declared or expands beyond it.
- Progress toward the goal: whether task state is changing in ways that move toward the goal.
Setting thresholds
Set thresholds relative to each task's declared envelope rather than to elapsed time. A signal that stays inside the envelope while progress continues is consistent with valid work. A signal that leaves the envelope, or consumption that rises without progress, is the basis for an intervention.
Declare the task envelope before the run starts
Runtime signals only have meaning when there is something to measure them against. Each task should declare its scope, budget, permissions, and tool allowlist before it starts, so that the system can tell the difference between expected and unexpected behavior while the run is in progress.
Graduated responses, kill switches, and audit trails
Responses should be proportionate to the risk, so that valid long-running work is not discarded when a signal is ambiguous. The available interventions escalate in this order:
- Alert: notify the responsible team that a signal has left the envelope.
- Throttle: slow the agent's activity or consumption.
- Pause: stop the run in a way that does not discard valid work.
- Terminate: end the run when the risk warrants it.
Keep a tested kill switch, and document the list of authorized users. Audit logs should record why an intervention fired, what the agent did beforehand, and who approved or overrode it.
Questions to answer before production
- Which signals (tool-call patterns, repeated actions, token or cost use, permission use, and progress toward the goal) do we capture per agent run today?
- Can each task declare its scope, budget, permissions, and tool allowlist before it starts?
- Can we alert, throttle, pause, and terminate without discarding valid long-running work?
- Is there a tested kill switch, and is the list of authorized users documented?
- Do audit logs record why an intervention fired, what the agent did beforehand, and who approved or overrode it?