Skip to content

detectZeroProgress

reference
1 min readUpdated

Kind: Function

Source: atloria-monorepo/libs/agent-core/src/benchmark/agent-hardening.ts

Detect consecutive turns with zero tokens (likely API failures).

If the last N turns all produced 0 tokens, the agent is stuck — probably hitting rate limits or auth errors silently.

Signature

ts
function detectZeroProgress(turnHistory: Array<{ tokens: number }>, threshold: number): boolean

Parameters

NameType
turnHistoryArray<{ tokens: number }>
thresholdnumber

Returns: boolean

Was this page helpful?

Download as PDF