From 19ef77c223faf9475c8716a269b77e4af89e72b4 Mon Sep 17 00:00:00 2001 From: Rishab Motgi Date: Wed, 20 May 2026 13:05:02 -0700 Subject: [PATCH] use 'is not None' check for FunctionSpanData output export Truthiness check dropped falsy return values (0, False, '', [], {}) from function tool traces, showing null in the dashboard instead. Fixes: tool returning 0 or False appears as null in traces --- src/agents/tracing/span_data.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/agents/tracing/span_data.py b/src/agents/tracing/span_data.py index d109ee5ead..785c85afa5 100644 --- a/src/agents/tracing/span_data.py +++ b/src/agents/tracing/span_data.py @@ -161,7 +161,7 @@ def export(self) -> dict[str, Any]: "type": self.type, "name": self.name, "input": self.input, - "output": str(self.output) if self.output else None, + "output": str(self.output) if self.output is not None else None, "mcp_data": self.mcp_data, }