huskies: merge 624_bug_agent_turn_and_budget_limits_not_enforced_coder_1_ran_5_6x_over_max_turns
This commit is contained in:
@@ -259,8 +259,18 @@ pub(super) fn tool_get_agent_remaining_turns_and_budget(
|
||||
agent_info.status,
|
||||
crate::agents::AgentStatus::Running | crate::agents::AgentStatus::Pending
|
||||
) {
|
||||
let reason_suffix = agent_info
|
||||
.termination_reason
|
||||
.as_ref()
|
||||
.map(|r| {
|
||||
format!(
|
||||
", termination_reason: {}",
|
||||
serde_json::to_string(r).unwrap_or_default()
|
||||
)
|
||||
})
|
||||
.unwrap_or_default();
|
||||
return Err(format!(
|
||||
"Agent '{agent_name}' for story '{story_id}' is not running (status: {})",
|
||||
"Agent '{agent_name}' for story '{story_id}' is not running (status: {}{reason_suffix})",
|
||||
agent_info.status
|
||||
));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user