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