Chicken Yakhni Pulao

2 cups basmati rice
Kosher salt
3 Tbsp. neutral oil
2 medium onions, finely sliced
2 lb skinless bone-in chicken thighs, cut in half
2 or 3 green chiles (optional)
A few sprigs of mint, to garnish (optional)
For the spice bag:
6 garlic cloves, cut in half
1 piece fresh ginger (5 cm or 2 inches long), cut into thick slices
6 green cardamom pods
6 cloves
2 pieces cassia bark, each 2.5 cm or 1 inch long
1 black cardamom pod
3 or 4 medium Indian bay leaves
2 heaped Tbsp. fennel seeds
2 tsp. coriander seeds

Wash the rice in several changes of cold running water until the water runs clear, then place in a bowl and soak for 30 minutes in more fresh cold water with 1/2 teaspoon salt.
In a frying pan (skillet), heat the oil over a medium–high heat. Add the sliced onions to the pan and fry gently, stirring occasionally, until golden brown and caramelized. Using a slotted spoon, remove the onions from the oil, leaving as much of the oil in the pan as possible to cook the chicken, and place on a plate to drain. Spread the onions across the plate so they crisp as they cool.
Keeping the heat on medium–high, add the chicken to the pan and sear it on all sides. Return half the caramelized onions to the pan.
To make the spice bag, place the spices in a piece of cheesecloth or muslin and knot the corners securely together so the bag does not open during cooking process.
Add the spice bag to the pan. Pour over enough cold water to cover the chicken and add 2 1/4 tsp salt. Bring the water to the boil, then lower the heat, cover with a lid and leave to cook for 20 minutes. After 10 minutes, check the chicken to make sure it is not falling apart.
Once the chicken is cooked, using a slotted spoon, carefully remove the chicken from the pan and place on a plate, trying to keep the meat on the bone.
For the yakhni, you will need approximately twice the volume of stock to rice (so 4 cups of stock to 2 cups of rice). If you have more than 4 cups, reduce the stock. If you have less than 4 cups, add some water.
Return the 4 cups of stock to the pan. Drain the rice and add to the pan, together with the chicken and green chiles, if using. Place the pan over a medium–high heat. Leaving the spice bag in the pan, bring the stock to the boil. Once boiling, lower the heat, cover with a lid, and leave to simmer. Check the pan often to see if the stock has been absorbed, but that the rice still retains some bite.
At this point, remove the rice pan from the direct heat and reduce the heat to low. Place the rice pan on a tawa (flat iron griddle pan), or the closest thing you have to a tawa—an iron plate or a flat pan—to diffuse the heat. Leave the rice pan on the tawa over a low heat for 10 minutes. Alternatively, place the rice pan in a preheated low oven for 10 minutes.
Once the pan has been removed from the heat source, cover the top of the pan with a dish towel and leave it undisturbed for 10 minutes.
Check the rice—there should be no liquid at the edges of the pan—and gently run a fork through to lift and separate the grains. To serve, garnish with the remaining caramelized onions and sprigs of mint.