pub struct StuckPolicy {
pub enabled: bool,
pub nudge_after: u32,
pub abort_after: u32,
}Expand description
Governs the loop’s stuck-detector. When the model repeats the same tool
call (name + args) round after round without making progress, the loop first
nudges it to change approach, then terminates cleanly with Outcome::Stuck
rather than burning the rest of the budget spinning on a loop.
Enabled by default with conservative thresholds — the calls must be byte-identical, so genuine “read the same file twice” work never trips it.
Fields§
§enabled: bool§nudge_after: u32Consecutive identical tool-call rounds before injecting a “you are repeating yourself, change your approach” feedback signal.
abort_after: u32Consecutive identical rounds before terminating with Outcome::Stuck.
Trait Implementations§
Source§impl Clone for StuckPolicy
impl Clone for StuckPolicy
Source§fn clone(&self) -> StuckPolicy
fn clone(&self) -> StuckPolicy
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for StuckPolicy
impl Debug for StuckPolicy
Auto Trait Implementations§
impl Freeze for StuckPolicy
impl RefUnwindSafe for StuckPolicy
impl Send for StuckPolicy
impl Sync for StuckPolicy
impl Unpin for StuckPolicy
impl UnsafeUnpin for StuckPolicy
impl UnwindSafe for StuckPolicy
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more