CubeLoop — a Pythonic, async-native agent harness core designed for high performance, readability, and production-grade persistence.
Python agent-frameworkagent-harnessagent-runtimeagentic-aiai-agentsai-frameworkanthropicharnessharness-engineeringharness-frameworklanggraphlanggraph-alternativellmmcpopenaipi-agentpi-agent-corepythonpython-agent
fix(tracing): clear stream_tool_accumulated at turn start
xf gongf0f06d8a3d38
diff --git a/cubepi/tracing/recorder.py b/cubepi/tracing/recorder.pyindex 344d5ff..9c5caee 100644--- a/cubepi/tracing/recorder.py+++ b/cubepi/tracing/recorder.py@@ -670,6 +670,9 @@ class Recorder:run.turn_terminated_by_tool = Falserun.turn_input_messages = []run.turn_output_messages = []+ # Reset per-turn stream-recording state so a partially-streamed tool+ # call in a prior turn cannot inflate accumulated counts in this turn.+ run.stream_tool_accumulated.clear()def _on_turn_end(self, event: TurnEndEvent) -> None:run = self._run