Recover no-action turns after tool errors

This commit is contained in:
2026-08-12 15:19:30 -05:00
parent b3f3a72435
commit a5fac64cd9
4 changed files with 258 additions and 21 deletions
@@ -52,6 +52,10 @@ impl PendingResponseStreams {
.collect()
}
pub fn has_stream(&self, stream_id: &ResponseStreamId) -> bool {
self.streams.contains_key(stream_id)
}
/// Attempts to inject a plain-text follow-up into an active steerable runtime.
///
/// Returning `None` leaves the caller free to use the normal
@@ -845,6 +845,17 @@ impl ResponseStream {
self.runtime_capabilities.host_managed_history
}
pub(super) fn has_error_tool_results(&self) -> bool {
self.params
.tool_results
.iter()
.any(galaxy_agent_core::ToolResult::is_error)
}
pub(super) fn tool_result_count(&self) -> usize {
self.params.tool_results.len()
}
pub fn allows_corrective_retries(&self) -> bool {
self.runtime_capabilities.corrective_retries
}