Skip to content

chore: command tool enhancements#324

Open
GangGreenTemperTatum wants to merge 4 commits intomainfrom
ads/cap-898-replace-custom-execution-tool-with-sdk-command-tool
Open

chore: command tool enhancements#324
GangGreenTemperTatum wants to merge 4 commits intomainfrom
ads/cap-898-replace-custom-execution-tool-with-sdk-command-tool

Conversation

@GangGreenTemperTatum
Copy link
Contributor

@GangGreenTemperTatum GangGreenTemperTatum commented Feb 6, 2026

chore: command tool enhancements max_output_chars

Key Changes:

  • added max_output_chars (default 100,000) and check (default True) parameters to both the command and python tools in the SDK's and now truncates output during streaming to prevent memory bloat on large outputs, while the python tool truncates after execution. When check=False, tools return (exit: N) prefixed output instead of raising RuntimeError on non-zero exits, enabling graceful handling of expected failures.

Changed:

  • native command tool

Generated Summary:

  • Introduced two new parameters in the command and python functions:
    • max_output_chars: Limits the number of characters captured in the output.
    • check: Controls whether to raise a RuntimeError on non-zero exit codes.
  • Modified error handling to:
    • Optionally return the output along with exit code when check is set to False.
    • Indicate when the output is truncated in error messages.
  • Enhanced output processing to truncate long outputs based on max_output_chars, ensuring performance and preventing excessive memory usage.
  • Updated function documentation to reflect new parameters and their effects.
  • Overall improvement to the command execution and error handling process, providing better control over output and handling of execution failures.

This summary was generated with ❤️ by rigging

GangGreenTemperTatum and others added 2 commits February 6, 2026 12:26
Reformat function signature to comply with line length rules.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.

2 participants