huskies: merge 624_bug_agent_turn_and_budget_limits_not_enforced_coder_1_ran_5_6x_over_max_turns

This commit is contained in:
dave
2026-04-25 13:07:12 +00:00
parent b70ee1aa4b
commit e20083a283
10 changed files with 435 additions and 7 deletions
+12
View File
@@ -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)]