From 8cea831009f9a313e8e6ff8bdd72cbb0d8f8c586 Mon Sep 17 00:00:00 2001 From: chengyongru Date: Sat, 9 May 2026 17:05:48 +0800 Subject: [PATCH] refactor(loop): log turn completion with state count --- nanobot/agent/loop.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/nanobot/agent/loop.py b/nanobot/agent/loop.py index 0a4d09d49..e6811ee65 100644 --- a/nanobot/agent/loop.py +++ b/nanobot/agent/loop.py @@ -1270,6 +1270,11 @@ class AgentLoop: ) ctx.state = next_state + logger.debug( + "[turn {}] Turn completed after {} states", + ctx.turn_id, + len(ctx.trace), + ) return ctx.outbound def _assemble_outbound(