Preheat oven to 325 degrees. Place chicken in an small baking dish and season generously all over with salt. Add garlic, lemon, thyme, chili, if using and a few grinds of pepper. Pour in oil and toss everything to coat. Turn garlic heads cut side down.
Roast chicken, rotating pan once, until meat is almost falling off the bone, 60-75 minutes. Let chicken cool in pan 10 minutes, then serve.