Combine the flour, baking powder, baking soda, salt, cinnamon, and cloves in a medium bowl. Set aside.
Put the butter and sugar in the bowl of the stand mixer and beat on medium speed for 1 minute until smooth. Add the eggs and vanilla and beat for 30 seconds.
Decrease the speed to low and mix in the sour cream and pumpkin just until combined. Remove the bowl from the mixer and stir in the flour mixture just until it is incorporated. Stir in the walnuts.
Scoop and drop the batter onto the prepared baking sheets, spacing 2 inches apart to allow for spreading.
Bake the cookies for 10 to 12 minutes, until they feel firm to the touch. To test, gently press your finger in the center, and a slight indentation should remain. Remove the cookies from the oven and allow them to sit on the pan for another 5 minutes, then transfer to a rack. Cool completely before adding the filling.
Filling
Put the butter, cream cheese, and vanilla in the mixer bowl and beat on medium-low speed for about 1 minute, until the mixture is smooth and thoroughly combined. Decrease the speed to low and add the confectioners sugar a little at a time. Beat on medium until the frosting is smooth, about 1 minute.
Assemble
Spread the flat side of half the cookies with the filling. Top with the remaining cookies. Because these cookies tend to be sticky, wrap each pie individually in plastic wrap for storing. Keep in the refrigerator.