Abstract

A method is disclosed for detecting, while it is still happening, a sustained runaway in the token consumption of one software agent in a fleet of language-model agents. A periodic sentinel builds, for every agent with recorded consumption in a trailing window and a sufficient baseline, a zero-filled, epoch-aligned series of per-bucket output tokens and scores it with a one-sided upper cumulative sum (CUSUM) against the agent's own robust baseline: the median and median absolute deviation (MAD) of its consumption per accounting interval over a trailing baseline history. The robust scale is the maximum of three terms — the consistency-scaled MAD, a fixed fraction of the absolute median, and a fixed positive absolute minimum — so a constant or empty history cannot collapse the slack and decision interval to zero. Partially observed edge buckets, including the current one, are scored as they stand, because the statistic is monotone non-decreasing in every observation: an under-counted bucket can delay an alarm but never cause one. Lost or malformed detector tuning falls back per key to defaults, because an alarm-only job must not be silenced by lost configuration, while a thin baseline is skipped and non-numeric data is refused, never alarmed. A persisted alarm is written as one deduplicated alert record and one decision-log record sharing one idempotent canonical identifier; later alarms for the agent are suppressed while that decision-log record is younger than a re-alert interval, so only persisted alarms arm the episode guard.

Creative Commons License

Creative Commons License
This work is licensed under a Creative Commons Attribution 4.0 License.

Share

COinS