Skip to content

Add silent flag on Command to suppress stdout/stderr from assistant messages#35

Draft
jackcbrown89 wants to merge 4 commits intomainfrom
jb-silent-commands
Draft

Add silent flag on Command to suppress stdout/stderr from assistant messages#35
jackcbrown89 wants to merge 4 commits intomainfrom
jb-silent-commands

Conversation

@jackcbrown89
Copy link
Copy Markdown
Contributor

@jackcbrown89 jackcbrown89 commented Apr 26, 2026

Summary

  • Add silent?: boolean to Command (server) and silent: bool = False to CommandInterface (Python client).
  • In invocation-runner.ts, when command.silent === true, skip the onStdout/onStderr handlers that would otherwise forward command output as assistant_message text_blocks. Applies to pre/post-agent commands and runCommandsOnly.

Compatibility

  • Default silent is false/unset, so existing behaviour is unchanged.
  • Older Python clients that don't send the field: server treats as not-silent (current behaviour).
  • Older runtimes that don't read the field: behaviour unchanged.

Test plan

  • npx vitest run in packages/runtimeuse — 145 passed (includes two new tests covering silent for pre/post commands and runCommandsOnly)
  • uv run pytest --ignore=test/llm --ignore=test/sandbox --ignore=test/e2e in packages/runtimeuse-client-python — 44 passed
  • e2e tests against a deployed runtime

Note

Medium Risk
Adds a new wire-level silent field that changes how command stdout/stderr is streamed as assistant_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 silent flag to both the TypeScript runtime Command type and the Python client CommandInterface to allow suppressing command stdout/stderr from being forwarded as assistant_message text blocks.

Updates InvocationRunner to omit onStdout/onStderr handlers when silent is true for pre/post-agent commands and command-only execution, and bumps versions to 0.14.0 with 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.

@jackcbrown89 jackcbrown89 marked this pull request as draft April 26, 2026 01:43
…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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant