Line two baking sheets with parchment paper (do not place the cookies directly on the baking sheets, they will spread too much).
Beat butter and both sugars for one minute until light and creamy. Add egg and vanilla and beat to combine, scraping the bowl if necessary.
In a separate bowl, combine flour, baking soda, baking powder, cinnamon and salt. Add the flour mixture to the butter mixture and beat on low until just combined. Add the oats, coconut, carrots and walnuts (if using) and mix until just combined.
Place the dough in the refrigerator for 45-60 minutes. Meanwhile, preheat oven to 350°F.
Scoop the dough into 2-teaspoon sized mounds and place a couple inches apart on the cookie sheets (make sure they are mounded and not flat). Ensure that the cookie dough mounds are similar in size so that cookies will bake up the same size.
Bake for 9-11 minutes, until golden brown and still slightly underdone in the center (they will be very delicate). If necessary, rotate your cookie sheets halfway through the baking time to ensure even baking. Follow notes below for shaping the cookies as soon as they come out of the oven.
Cool the cookies completely on the baking sheets placed on wire racks. Repeat with remaining dough, chilling the dough between batches and allowing the baking sheets to cool completely before adding the next batch of dough.
Once the cookies have cooled to room temperature, proceed with the frosting.