From c1888d31fe8e78b349b7e88d81b17445b41eee58 Mon Sep 17 00:00:00 2001 From: Levi Neely Date: Thu, 1 Oct 2026 09:23:25 +0200 Subject: [PATCH] agent: increase tool result hard limit from 32KB to 128KB --- cmd/olliesrv/internal/agent/loop.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/olliesrv/internal/agent/loop.go b/cmd/olliesrv/internal/agent/loop.go index 54308c2..3d345d2 100644 --- a/cmd/olliesrv/internal/agent/loop.go +++ b/cmd/olliesrv/internal/agent/loop.go @@ -37,12 +37,12 @@ const ( // Truncation stack (from outer to inner): // - Server 10MB (toolsrv/shell.go limitedWriter): OOM safety. Prevents runaway // process output from exhausting memory. Well above model limit. -// - Agent 32KB (this constant): The model-facing cap. Applied in two places: +// - Agent 128KB (this constant): The model-facing cap. Applied in two places: // streaming path (caps real-time chunks sent to UI) and post-hoc (caps stored // result). Both use this constant — it's one policy, two enforcement points. // - Detach 64KB ring (toolsrv/detach.go): Separate system for background // processes. Unrelated to the model context. -const defaultToolResultMaxBytes = 32 * 1024 +const defaultToolResultMaxBytes = 128 * 1024 // MemoryTier classifies how long a tool result stays in the hot message list. type MemoryTier int