From 45b368af2e87dcf2f55c42003b6f4b842f7a6741 Mon Sep 17 00:00:00 2001 From: Sam Catlow Date: Mon, 9 Nov 2026 01:45:07 +1100 Subject: [PATCH] docs(agentexec): drop history and refactoring narration from comments --- internal/agentexec/helpers.go | 3 +-- internal/agentexec/modelloop/toolset.go | 15 ++++++--------- 2 files changed, 7 insertions(+), 11 deletions(-) diff --git a/internal/agentexec/helpers.go b/internal/agentexec/helpers.go index c7792fe5d..cf80deb84 100644 --- a/internal/agentexec/helpers.go +++ b/internal/agentexec/helpers.go @@ -16,8 +16,7 @@ import ( // toolCallDetailBytes caps the summary ToolCallReport.Detail carries. This // rides on every task's observability event stream, so one large file read -// must not dominate it the way baselineMissionBytes-sized content is allowed -// to dominate a builder's own context. +// must not dominate it. const toolCallDetailBytes = 300 func ClipToolCallDetail(s string) string { diff --git a/internal/agentexec/modelloop/toolset.go b/internal/agentexec/modelloop/toolset.go index 12328fc6c..01566a2c1 100644 --- a/internal/agentexec/modelloop/toolset.go +++ b/internal/agentexec/modelloop/toolset.go @@ -36,24 +36,22 @@ func (l ToolLimits) EnsureSpillDir() error { return nil } -// Options builds the tool-set options for a single turn or stage. -// There is no aggregate turn output budget; only per-result caps apply. +// Options builds the tool-set options for a single turn or stage. Only +// per-result caps apply; there is no aggregate turn output budget. func (l ToolLimits) Options(excludeToolsets ...string) ToolSetOptions { - opts := ToolSetOptions{ + return ToolSetOptions{ MaxResultChars: l.MaxResultChars, ExcludeToolsets: excludeToolsets, SpillDir: l.SpillDir, } - return opts } // ToolSetOptions bounds what a built tool set may do and return. // -// The zero value builds every available tool with no result limits, which is -// the behaviour this package had before the options existed. +// The zero value builds every available tool with no result limits. type ToolSetOptions struct { // SpillDir receives complete results displaced by the per-tool cap. Empty - // selects inline truncation. There is deliberately no aggregate turn cap. + // selects inline truncation. SpillDir string // MaxResultChars caps a single tool result. Entries setting @@ -78,8 +76,7 @@ type ToolSetOptions struct { } // reportToolCallCompletion notifies opts.OnToolCall, if set, of one -// completed call. Factored out of toolExecute's closure so the branching -// here doesn't add to that function's own cognitive-complexity budget. +// completed call. func reportToolCallCompletion(opts ToolSetOptions, entry tools.ToolEntry, result string, err error) { if opts.OnToolCall == nil { return