From fafd35889037a5512933f29862475a83ec77f570 Mon Sep 17 00:00:00 2001 From: Victor Giers Date: Mon, 15 Jun 2026 21:47:50 +0200 Subject: [PATCH] Clean up workflow runtime result by removing 'items' field --- backend/agent/runtime.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/backend/agent/runtime.py b/backend/agent/runtime.py index 61453be..956a632 100644 --- a/backend/agent/runtime.py +++ b/backend/agent/runtime.py @@ -536,8 +536,7 @@ class WorkflowRuntime: result = dict(value) if "context_block" in result: result["context_block"] = str(result["context_block"])[:maximum] - while json_size(result) > maximum and isinstance(result.get("sources"), list) and result["sources"]: - result["sources"].pop() + result.pop("items", None) return result if isinstance(value, list): result = []