huskies: merge 624_bug_agent_turn_and_budget_limits_not_enforced_coder_1_ran_5_6x_over_max_turns
This commit is contained in:
@@ -80,6 +80,16 @@ pub enum AgentStatus {
|
||||
Failed,
|
||||
}
|
||||
|
||||
/// Why an agent was forcibly terminated by the watchdog.
|
||||
#[derive(Debug, Clone, Serialize, PartialEq)]
|
||||
#[serde(rename_all = "snake_case")]
|
||||
pub enum TerminationReason {
|
||||
/// Agent exceeded its configured `max_turns`.
|
||||
TurnLimit,
|
||||
/// Agent exceeded its configured `max_budget_usd`.
|
||||
BudgetLimit,
|
||||
}
|
||||
|
||||
impl std::fmt::Display for AgentStatus {
|
||||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||
match self {
|
||||
@@ -192,6 +202,8 @@ pub struct AgentInfo {
|
||||
pub log_session_id: Option<String>,
|
||||
/// True when a rate-limit throttle warning was received for this agent.
|
||||
pub throttled: bool,
|
||||
/// Set when the watchdog terminates the agent for exceeding a limit.
|
||||
pub termination_reason: Option<TerminationReason>,
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
|
||||
Reference in New Issue
Block a user