mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-08 01:21:25 +00:00
feat: add stuck loop detection and exponential backoff infrastructure for agent polling (#17118)
Merged via /review-pr -> /prepare-pr -> /merge-pr.
Prepared head SHA: eebabf679b
Co-authored-by: akramcodez <179671552+akramcodez@users.noreply.github.com>
Co-authored-by: gumadeiras <5599352+gumadeiras@users.noreply.github.com>
Reviewed-by: @gumadeiras
This commit is contained in:
@@ -134,6 +134,19 @@ export type DiagnosticHeartbeatEvent = DiagnosticBaseEvent & {
|
||||
queued: number;
|
||||
};
|
||||
|
||||
export type DiagnosticToolLoopEvent = DiagnosticBaseEvent & {
|
||||
type: "tool.loop";
|
||||
sessionKey?: string;
|
||||
sessionId?: string;
|
||||
toolName: string;
|
||||
level: "warning" | "critical";
|
||||
action: "warn" | "block";
|
||||
detector: "generic_repeat" | "known_poll_no_progress" | "global_circuit_breaker" | "ping_pong";
|
||||
count: number;
|
||||
message: string;
|
||||
pairedToolName?: string;
|
||||
};
|
||||
|
||||
export type DiagnosticEventPayload =
|
||||
| DiagnosticUsageEvent
|
||||
| DiagnosticWebhookReceivedEvent
|
||||
@@ -146,7 +159,8 @@ export type DiagnosticEventPayload =
|
||||
| DiagnosticLaneEnqueueEvent
|
||||
| DiagnosticLaneDequeueEvent
|
||||
| DiagnosticRunAttemptEvent
|
||||
| DiagnosticHeartbeatEvent;
|
||||
| DiagnosticHeartbeatEvent
|
||||
| DiagnosticToolLoopEvent;
|
||||
|
||||
export type DiagnosticEventInput = DiagnosticEventPayload extends infer Event
|
||||
? Event extends DiagnosticEventPayload
|
||||
|
||||
Reference in New Issue
Block a user