summaryrefslogtreecommitdiff
path: root/src/tui_app.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/tui_app.zig')
-rw-r--r--src/tui_app.zig6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/tui_app.zig b/src/tui_app.zig
index 4e9fee3..b7c297b 100644
--- a/src/tui_app.zig
+++ b/src/tui_app.zig
@@ -924,10 +924,14 @@ pub const App = struct {
_ = try self.spawnStatus("context overflow: compacting and retrying");
} else {
const secs = @as(f64, @floatFromInt(info.delay_ms)) / 1000.0;
+ // Prefer the provider's own diagnostic (e.g. an Anthropic
+ // `overloaded_error: ...`) over the bare error name, so
+ // the user sees *why* the turn stalled.
+ const reason = info.message orelse @errorName(info.err);
const msg = try std.fmt.allocPrint(
self.alloc,
"provider unavailable ({s}): retrying in {d:.1}s (attempt {d}/{d})",
- .{ @errorName(info.err), secs, info.attempt + 1, info.max_attempts },
+ .{ reason, secs, info.attempt + 1, info.max_attempts },
);
defer self.alloc.free(msg);
_ = try self.spawnStatus(msg);