@@ -273,14 +273,14 @@ func (b *bashTool) Run(ctx context.Context, call ToolCall) (ToolResponse, error)
276− return NewTextErrorResponse("permission denied"), nil
276+ return ToolResponse{}, permission.ErrorPermissionDenied
279 startTime := time.Now()
279 startTime := time.Now()
280 shell := shell.GetPersistentShell(config.WorkingDirectory())
280 shell := shell.GetPersistentShell(config.WorkingDirectory())
281 stdout, stderr, exitCode, interrupted, err := shell.Exec(ctx, params.Command, params.Timeout)
281 stdout, stderr, exitCode, interrupted, err := shell.Exec(ctx, params.Command, params.Timeout)
282 if err != nil {
282 if err != nil {
283− return NewTextErrorResponse(fmt.Sprintf("error executing command: %s", err)), nil
283+ return ToolResponse{}, fmt.Errorf("error executing command: %w", err)
285 took := time.Since(startTime).Milliseconds()
285 took := time.Since(startTime).Milliseconds()