Skip to content

agent.set_default_watchdog

agent.set_default_watchdog(spec)

Set the harness watchdog policy for the built-in default personality, the personality active when there isn't any config personality selected. The last call wins. It governs only the default.

Parameters

  • spec: {max_consecutive_errors: number?, max_rounds_without_success: number?, refractory_rounds: number?, refractory_seconds: number?, repeat_sentence_window: number?, repeat_sentence_threshold: number?, repeat_sentence_threshold_loose: number?, min_sentence_chars: number?, min_armed_sentences: number?, repeat_call_window: number?, repeat_call_threshold: number?, repeat_call_max_len: number?, max_think_nudges: number?, interrupt_on_cap: boolean?, nudge_text: string?, break_loop_text: string?}
    • max_consecutive_errors (default defaults :: MAX_CONSECUTIVE_ERRORS) — The number of consecutive real tool failures before the error-streak trigger arms.
    • max_rounds_without_success (default defaults :: MAX_ROUNDS_WITHOUT_SUCCESS) — The number of consecutive rounds ending without a successful tool result before the no-progress trigger arms.
    • refractory_rounds (default defaults :: REFRACTORY_ROUNDS) — The number of rounds that must complete after a nudge before another may fire. Both this and refractory_seconds must elapse.
    • refractory_seconds (default defaults :: REFRACTORY_SECONDS) — The wall-clock delay that must elapse after a nudge before another may fire, in seconds. Both this and refractory_rounds must elapse.
    • repeat_sentence_window (default defaults :: REPEAT_SENTENCE_WINDOW) — The number of sentences the repetition detector keeps in its sliding window.
    • repeat_sentence_threshold (default defaults :: REPEAT_SENTENCE_THRESHOLD) — The number of occurrences of one normalized sentence before the strict tier fires.
    • repeat_sentence_threshold_loose (default defaults :: REPEAT_SENTENCE_THRESHOLD_LOOSE) — Occurrences of one content-word set before the loose tier fires.
    • min_sentence_chars (default defaults :: MIN_SENTENCE_CHARS) — Sentences shorter than this are not counted.
    • min_armed_sentences (default defaults :: MIN_ARMED_SENTENCES) — Sentences that must have been observed before the detector arms.
    • repeat_call_window (default defaults :: REPEAT_CALL_WINDOW) — Tool invocations the call-repetition detector keeps in its window.
    • repeat_call_threshold (default defaults :: REPEAT_CALL_THRESHOLD) — The number of occurrences of one call sequence before the call-repetition trigger arms.
    • repeat_call_max_len (default defaults :: REPEAT_CALL_MAX_LEN) — The maximum length of the call sequence the detector counts.
    • max_think_nudges (default defaults :: MAX_THINK_NUDGES) — The per-turn cap on break-the-loop nudges.
    • interrupt_on_cap (default true) — Whether the turn is interrupted when the break-the-loop nudge cap is exceeded. When false the watchdog does nothing at the cap.
    • nudge_text — The escalation nudge text, used verbatim.
    • break_loop_text — The break-the-loop nudge text, used verbatim.