feat: show tool activity on stderr in exec text mode - #293
Merged
Conversation
exec text mode was silent about tool calls, unlike --print which surfaces [ToolName] on stderr. During an autonomous multi-turn run the user had no visibility into which tools the agent invoked (file writes, shell, web search). Emit [ToolName] on tool_use and a truncated [ToolName] <result> on tool_result, gated on !IsQuiet() so --quiet/CI output stays clean and stdout stays machine-parseable. stream-json output is unchanged.
Patel230
added a commit
that referenced
this pull request
Sep 7, 2026
--print already honored --quiet for the usage footer (PR #289) and exec now honors it for tool activity (PR #293), but --print's [ToolName] stderr labels were emitted unconditionally. Gate them on !IsQuiet() so --print --quiet is fully clean (machine-parseable stdout and no decoration on stderr), matching exec and the --quiet contract. stream-json output is unchanged.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
graycode exectext mode was silent about tool activity, unlike--printwhich surfaces[ToolName]on stderr. During an autonomous multi-turn run the user had no visibility into which tools the agent invoked (file writes, shell, web search).Now exec text mode emits
[ToolName]ontool_useand a truncated[ToolName] <result>ontool_result, gated on!IsQuiet()so--quiet/CI output stays clean and stdout stays machine-parseable.stream-jsonoutput is unchanged.Verification
go build ./...,go vet ./cmd/,gofumpt -lclean.go test ./...exit 0.--printstderr convention; streaming loop is exercised via the existing event path (not unit-testable without a live session).