Skip to content

Commit aa1fb49

Browse files
committed
Fix bash tool isError behavior to match taiga implementation
- Changed bash tool to always return isError=false for successfully executed commands - Non-zero exit codes are part of normal command output, not MCP protocol errors - Only actual tool execution failures (exceptions) now set isError=true - This aligns with taiga's bash tool behavior where CLIResult contains output/error but doesn't set isError based on exit code
1 parent 5074233 commit aa1fb49

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/tools/bash.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,9 +87,9 @@ function execute(tool::BashTool, params::Dict)
8787

8888
result_text = join(response_parts)
8989

90-
# Command had non-zero exit code, treat as error
91-
is_error = exit_code != 0
92-
return create_content_response(result_text, is_error=is_error)
90+
# Return success - non-zero exit codes are part of normal command output, not MCP errors
91+
# Only actual tool failures (exceptions) should set isError=true
92+
return create_content_response(result_text, is_error=false)
9393

9494
catch e
9595
error_msg = "Failed to execute command: " * string(e)

0 commit comments

Comments
 (0)