From 9645dcb71ff72576cac2ebf0c3546e59c4fedff3 Mon Sep 17 00:00:00 2001 From: EMRG Evolution Date: Mon, 17 Aug 2026 12:06:46 +0800 Subject: [PATCH] emrg: memory reflection tool log includes session id + round + truncation marker MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Host rant 2026-08-17T12:00:35: 'memory reflection tool: bash → ---' was unclear — no context (which background task), no session id (other lines in the same function carry id=%s round=%d), and the truncated '---' looked like meaningless output rather than the first 100 chars of a YAML frontmatter. - Prefix unified to 'memory reflection:' (matches sibling logs) - Added id= round= (the for-loop round, 1-based) - Result truncated to 100 chars with a '…' suffix when longer, so it is unambiguous that the output was cut. Example: memory reflection: id=s_xxx round=2 tool bash → ---… No test changes (log-only). --- emrg/server/daemon.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/emrg/server/daemon.py b/emrg/server/daemon.py index 82677700..f27611ca 100644 --- a/emrg/server/daemon.py +++ b/emrg/server/daemon.py @@ -3445,7 +3445,12 @@ async def _reflect(): "tool_call_id": tc_id, "content": result_text, }) - logger.debug("memory reflection tool: %s → %s", tc_name, _redact_string(result_text[:100])) + logger.debug( + "memory reflection: id=%s round=%d tool %s → %s%s", + session.session_id, _round + 1, tc_name, + _redact_string(result_text[:100]), + "…" if len(result_text) > 100 else "", + ) except Exception: logger.debug("memory reflection failed", exc_info=True)