pub enum GuardDecision {
Continue {
nudge: Option<String>,
},
Complete,
Fail {
error: String,
},
DisableThinking {
nudge: String,
},
RestoreThinking,
RetryTurn,
}Expand description
Guard decision — returned by guard, executed by base loop.
Variants§
Continue
Continue loop, optionally inject nudge message
Complete
Normal completion (fire_turn_end + RunOutcome::Completed)
Fail
Abnormal termination (fire_guard_fail + RunOutcome::Failed)
DisableThinking
Temporarily disable thinking functionality
Used for reasoning-only loop scenarios: model keeps thinking but produces no output. After calling, runtime will:
- Set thinking_disabled_for_rest_of_run = true
- Inject nudge message
- Continue loop
RestoreThinking
Restore thinking functionality to previous state
Used for thinking recovery scenarios: model starts working normally (has text or tool call). After calling, runtime will:
- Restore thinking_disabled_for_rest_of_run to original state
- Reset related counters
RetryTurn
Discard this response whole and re-ask the LLM from the same state.
For silent rounds whose tool-call batch is structurally corrupt (wire
truncation / misplaced args fragments). The kernel executes the
discard: NO history commit, NO tool execution — the response never
happened. The retry stays inside the current turn (turn_count
unchanged) and is bounded by the policy budget carried in
GuardCtx::silent_retries_in_round plus a kernel hard cap.
Never returned for rounds whose text already reached the user.
Trait Implementations§
Source§impl Clone for GuardDecision
impl Clone for GuardDecision
Source§fn clone(&self) -> GuardDecision
fn clone(&self) -> GuardDecision
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more