Add silent flag on Command to suppress stdout/stderr from assistant messages#35
Draft
jackcbrown89 wants to merge 4 commits intomainfrom
Draft
Add silent flag on Command to suppress stdout/stderr from assistant messages#35jackcbrown89 wants to merge 4 commits intomainfrom
jackcbrown89 wants to merge 4 commits intomainfrom
Conversation
…essages Plumbing commands like git clone/push surface their output as assistant messages and leak into user-facing log streams downstream. Adding an opt-in `silent` flag on Command lets callers (e.g. lark's StandardGitRepoManager) mark these commands so the runner skips the onStdout/onStderr forwarding for both pre/post-agent commands and runCommandsOnly. Default behaviour is unchanged. Older Python clients that don't set the field are unaffected; older runtimes that don't read the field also behave unchanged.
d5a9bb5 to
12089a1
Compare
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
silent?: booleantoCommand(server) andsilent: bool = FalsetoCommandInterface(Python client).invocation-runner.ts, whencommand.silent === true, skip theonStdout/onStderrhandlers that would otherwise forward command output asassistant_messagetext_blocks. Applies to pre/post-agent commands andrunCommandsOnly.Compatibility
silentisfalse/unset, so existing behaviour is unchanged.Test plan
npx vitest runinpackages/runtimeuse— 145 passed (includes two new tests covering silent for pre/post commands andrunCommandsOnly)uv run pytest --ignore=test/llm --ignore=test/sandbox --ignore=test/e2einpackages/runtimeuse-client-python— 44 passedNote
Medium Risk
Adds a new wire-level
silentfield that changes how command stdout/stderr is streamed asassistant_messages, which could affect consumers relying on that output. Default behavior remains unchanged when the flag is unset/false, limiting compatibility risk.Overview
Adds a per-command
silentflag to both the TypeScript runtimeCommandtype and the Python clientCommandInterfaceto allow suppressing command stdout/stderr from being forwarded asassistant_messagetext blocks.Updates
InvocationRunnerto omitonStdout/onStderrhandlers whensilentis true for pre/post-agent commands and command-only execution, and bumps versions to0.14.0with docs/tests updated to cover the new field and behavior.Reviewed by Cursor Bugbot for commit d5a9bb5. Bugbot is set up for automated code reviews on this repo. Configure here.