Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions environment/large_output.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading