Skip to content

graff — a fast agentic coding harness in Zig: multi-provider, MCP, workflows, DGM evolution loop, TS/Python SDKs

Python

Merge #693 into release/v0.0.282: preserve terminal Codex WS API errors

Cursor Agent20de3d426de2
diff --cc src/agent_request.zig
index d279e2ed,58fff510..615c0d11
--- a/src/agent_request.zig
+++ b/src/agent_request.zig
@@@ -467,9 -467,9 +468,9 @@@ pub fn request(self: *Agent, tools_in:
// Codex Responses reports capacity failures through this
// response.failed arm too. Keep it on the same bounded
// overload retry path as SSE and JSON error envelopes.
- if (try retryTransientServerError(self, "", failure.code, msg, &server_retries)) continue :rebuild;
+ if (try policy.afterServerErrorOrParseReject(self, "", failure.code, msg, &server_retries, &gw_retry)) continue :rebuild;
if (self.tracer) |tr| tr.api(self.label, self.sub, self.provider.model, ms, body.len, resp_body.len, 0, 0, true);
- try self.sayApiError("{s} api error: {s}", .{ self.provider.id, msg });
+ try self.sayApiError("{s}", .{diagnostic});
return error.ApiError;
},
}