From 8840830bbb032d7cea3a68cd8cf1d9cc2b20669d Mon Sep 17 00:00:00 2001 From: ysyneu Date: Sun, 31 May 2026 16:07:43 +0800 Subject: [PATCH] =?UTF-8?q?feat(runner):=20bump=20tool-output=20spill=20th?= =?UTF-8?q?reshold=2030K=E2=86=9250K?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Match Claude Code's DEFAULT_MAX_RESULT_SIZE_CHARS spill threshold. A tool result larger than this is persisted to .outputs/ and the agent gets a preview + path; 50K chars (~12.5k tokens) lets more useful output through inline before spilling, matching the upstream standard. Preview sizing (8000 chars / 20 lines) is unchanged. --- environment/large_output.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/environment/large_output.go b/environment/large_output.go index 84509a5..d833ddf 100644 --- a/environment/large_output.go +++ b/environment/large_output.go @@ -17,8 +17,11 @@ import ( var readCommandRe = regexp.MustCompile(`(?:^|[\s;|&])(?:cat|head|tail|less|more|bat)\s`) const ( - // DefaultMaxOutputSize is the default character limit before truncation (~7.5k tokens) - DefaultMaxOutputSize = 30000 // ~7.5k tokens at 4 chars/token + // DefaultMaxOutputSize is the default character limit before truncation. + // 50000 chars (~12.5k tokens at 4 chars/token) matches Claude Code's + // DEFAULT_MAX_RESULT_SIZE_CHARS spill threshold — the point at which a tool + // result is persisted to a file and the agent gets a preview + path. + DefaultMaxOutputSize = 50000 // DefaultPreviewSize is the maximum characters for preview DefaultPreviewSize = 8000 // ~2k tokens // DefaultPreviewLines is the number of lines shown in the preview