From 4f51fb6a830b429b6f5d868b99e916ef8c2af805 Mon Sep 17 00:00:00 2001 From: Moritz Graf Date: Sat, 10 Oct 2026 15:53:02 +0200 Subject: [PATCH] docs(openclaw): add issue 23 troubleshooting for koch agent tool stall & update knowledge-wiki --- k8s/openclaw/TROUBLESHOOTING.md | 27 +++++++++++++++++++++++++++ knowledge-wiki | 2 +- 2 files changed, 28 insertions(+), 1 deletion(-) diff --git a/k8s/openclaw/TROUBLESHOOTING.md b/k8s/openclaw/TROUBLESHOOTING.md index 66fc5a0..f8b4982 100644 --- a/k8s/openclaw/TROUBLESHOOTING.md +++ b/k8s/openclaw/TROUBLESHOOTING.md @@ -743,3 +743,30 @@ This document captures fixed issues, operational quirks, and incident root-cause - Always provide exact argument property names in direct tool fastpaths so LLMs do not guess invalid keys like `path` instead of `lookup`. - Mandate strict turn isolation in agent system prompts to prevent stalled turns from bleeding into new user prompts during context spikes. - Rely on Tier A daily resets (04:45 CET) for logging/stateful agents whose canonical history is fully externalized in DuckDB, JSONL, and Git. + +### Issue 23: Empty Completion Whitespace Stall & Repeated Turn Bleed on Koch Agent (Topic 21) + +- **Date**: 2026-10-10 +- **Severity**: High (User prompt asking for nutrition plan and 2-week intake vs. expenditure was answered with duplicate Dörrfleisch marinade recipe; earlier Skyr intake voice note was skipped; missing Garmin sync dependencies) +- **Symptom**: + Moritz sent a text message in Topic 21: _"Gib mir die aktuelle Ausgabe meines Ernährungsplans und erstelle eine 'Kalorien intakde' vs 'Kalorienverrauch' der letzten 2 Wochen."_ + Instead of querying Datastore DuckDB, the Koch Agent replied for the third time with tips on beef jerky kiwi-teriyaki marinade (_"Meine Empfehlung für deine Kiwi-Teriyaki-Marinade (800 g Dörrfleisch)..."_). Earlier at 12:14, Moritz's voice note logging Skyr Natur (300g), Erdbeerjoghurt (125g), and Knuspermüsli (44g) was never recorded. +- **Root Cause Isolated via New One-Shot Triage Workflow**: + 1. Running `openclaw-triage.py --topic 21` instantly revealed the sequence of events (SEQ 13, 18, 20, 22): + `z-ai/glm-5.3-flash` emitted reasoning (`THINKING: Two tasks: 1) current nutrition summary... Query datastore... Use bash`) along with an empty single-space string (`TEXT: " "`) and **0 tool calls**. + 2. Because the model emitted whitespace instead of invoking `exec`, OpenClaw triggered an internal retry: _"the runtime says the previous turn recorded reasoning but no visible answer"_. + 3. On retry, the model failed to understand why it was re-prompted without new user input. Seeing the previous Dörrfleisch recipe in conversational context, it concluded that the previous turn had failed to render and repeated the Dörrfleisch text. + 4. In addition, `garmin_sync.py` failed to mirror daily expenditure stats for the last 14 days (`No module named 'garminconnect'`) because it was missing a PEP 723 dependency declaration. +- **Resolution**: + 1. **Delivered Correct Nutrition Summary & 14-Day Balance**: + - Logged missing Skyr bowl (300g Skyr, 125g Erdbeerjoghurt, 44g Knuspermüsli $\rightarrow$ ~502 kcal, 40.7g Protein) into datastore via `datastore.py add`. + - Added PEP 723 `# /// script dependencies = ["garminconnect>=0.2.14", "pytz>=2024.1"] ///` to `mop-skills/skills/datastore/scripts/garmin_sync.py` and synced all 14 days of Garmin metrics. + - Delivered complete, formatted 14-day balance and today's nutrition status directly to Topic 21 (Message ID 2532). + 2. **Hardened `knowledge-wiki/agents/koch.md`**: + - Explicitly mandated CLI execution via `exec(command="uv run ...")`. + - Added runtime retry protection forbidding repetition of earlier completed topics. + 3. **Reset Topic 21 Session**: + - Reset session `feeb6826` to 0 tokens via `openclaw sessions delete`. +- **How to Avoid Recurrence**: + - Always declare PEP 723 script metadata on all Python utilities invoked via `uv run`. + - Provide explicit tool invocations (`exec(command=...)`) in agent prompts so reasoning models never stall in thinking-only loops. diff --git a/knowledge-wiki b/knowledge-wiki index ad3ae04..92c28c9 160000 --- a/knowledge-wiki +++ b/knowledge-wiki @@ -1 +1 @@ -Subproject commit ad3ae046a66e834c19c7c2376bd67df662743d81 +Subproject commit 92c28c9c4d0c1f44307b3e2f60bb243a2ea689ba