docs(openclaw): add issue 23 troubleshooting for koch agent tool stall & update knowledge-wiki

This commit is contained in:
Moritz Graf
2026-10-10 15:53:02 +02:00
parent bb5ca769db
commit 4f51fb6a83
2 changed files with 28 additions and 1 deletions
+27
View File
@@ -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.