From 3f1ace16afc7877b0bfad374cb286d4d84140960 Mon Sep 17 00:00:00 2001 From: t Date: Thu, 4 Jun 2026 09:46:49 -0600 Subject: failure retries scheme --- libpanto/src/conversation.zig | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'libpanto/src/conversation.zig') diff --git a/libpanto/src/conversation.zig b/libpanto/src/conversation.zig index 2c29f8e..f0c822d 100644 --- a/libpanto/src/conversation.zig +++ b/libpanto/src/conversation.zig @@ -71,6 +71,12 @@ pub const ResultPartStored = union(enum) { pub const ToolResultBlock = struct { tool_use_id: []const u8, parts: std.ArrayList(ResultPartStored) = .empty, + /// True when this result reports a tool failure rather than success. + /// Serialized to providers that support it (Anthropic's `is_error`); + /// recorded but unserialized for OpenAI Chat (the error text in `parts` + /// carries the signal there). Defaults to false for backward + /// compatibility with sessions written before this field existed. + is_error: bool = false, pub fn deinit(self: *ToolResultBlock, alloc: Allocator) void { alloc.free(self.tool_use_id); -- cgit v1.3