From 027ba2896d6e40938a30becf170c1e337e19e074 Mon Sep 17 00:00:00 2001 From: duffyduck Date: Sun, 31 May 2026 01:03:20 +0200 Subject: [PATCH] =?UTF-8?q?fix(brain):=20dritter=20Tool-Result-Truncation-?= =?UTF-8?q?Punkt=20=E2=80=94=20agent.py:947=20von=208KB=20auf=2050KB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Im Stefan-Test (31.05.2026) hat ARIA das spotify-Skill korrekt mit _all=true aufgerufen, der Skill paginierte sauber alle 90 Playlists in 34 KB compact JSON. Aber: ARIA's Thinking sagte 'tool result was cut off'. Disk-Log + Skill-Return waren beide OK. agent.py:1160 cap ist 50 KB (passt). Aber: agent.py:947 cap'd tool_result[:8000] beim Append in die Proxy- Conversation. DRITTER Truncation-Punkt fuer denselben Output, fuer Claude effectiv abgeschnitten — Skill liefert 34 KB, ARIA sieht 8 KB. Auf 50 KB hochgesetzt (konsistent mit dem anderen Cap in derselben Datei). Tests + nochmal restart noetig. Lerneffekt: bei Stdout-Caps suche IMMER alle Truncation-Punkte. War jetzt der dritte den ich heute gefunden hab. ;-) --- aria-brain/agent.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/aria-brain/agent.py b/aria-brain/agent.py index 494b156..a6cdcae 100644 --- a/aria-brain/agent.py +++ b/aria-brain/agent.py @@ -940,11 +940,19 @@ class Agent: # Tools ausfuehren + Ergebnis als role=tool zurueck for tc in result.tool_calls: tool_result = self._dispatch_tool(tc["name"], tc["arguments"]) + # Cap auf 50 KB — passt zur Cap in _dispatch_tool fuer + # Skill-Outputs (siehe agent.py weiter unten). 8 KB war + # viel zu wenig: Spotify _all=true mit 90 Playlists + # liefert ~34 KB compact, das wurde hier auf 8 KB + # zugeschnitten und ARIA glaubte die Liste sei + # abgeschnitten obwohl der Skill alles korrekt + # paginiert hatte. Claude-Context vertraegt locker + # 50 KB pro Tool-Result. messages.append(ProxyMessage( role="tool", tool_call_id=tc["id"], name=tc["name"], - content=tool_result[:8000], + content=tool_result[:50000], )) continue # next iteration mit Tool-Results # Kein Tool-Call mehr → final reply