pub struct GuardCtx {Show 17 fields
pub session_id: SessionId,
pub turn_count: u32,
pub user_input: String,
pub model_response: String,
pub finish_reason: FinishReason,
pub available_tools: Vec<String>,
pub reasoning_only_strikes: usize,
pub empty_response_strikes: usize,
pub run_has_tool_calls: bool,
pub last_tool_calls_invalid: bool,
pub all_user_inputs: Vec<String>,
pub is_reasoning_only: bool,
pub is_empty_response: bool,
pub is_text_only: bool,
pub thinking_disabled: bool,
pub original_thinking_enabled: bool,
pub remaining_turns: u32,
}Expand description
Guard context information — built by runtime, passed to guard.
Fields§
§session_id: SessionId§turn_count: u32§user_input: String§model_response: String§finish_reason: FinishReason§available_tools: Vec<String>§reasoning_only_strikes: usize§empty_response_strikes: usize§run_has_tool_calls: bool§last_tool_calls_invalid: boolThe most recent assistant tool calls were ALL rejected before
execution (truncated/invalid arguments) and the model was told to
re-issue them (RunState.truncation_strikes > 0). While this is
true, a text-only response cannot be task completion — the work the
text describes was never executed (session 20260904_efad759c: a
fabricated success narrative passed the completion judge).
all_user_inputs: Vec<String>All user messages in the current session, ordered oldest-first. Guards can use this to reconstruct full conversation context (e.g. “继续” after a multi-turn discussion).
is_reasoning_only: bool§is_empty_response: bool§is_text_only: bool§thinking_disabled: bool§original_thinking_enabled: boolOriginal thinking configuration (for restoration)
From RunState.original_thinking_enabled
remaining_turns: u32Remaining turns before hitting max_turns limit
Guards can use this to nudge the model to wrap up when running low on turns. When remaining_turns == 0, the run will be terminated with MaxTurnsExceeded.