Heat 1/3 cup oil in a large pan over medium heat, then add the sliced onions and cook for about 10 minutes until the edges begin to brown.
Add the minced garlic and ginger and fry, stirring, for 30 seconds until fragrant.
Stir in the crushed tomatoes, ground coriander, ground cumin, paprika, salt, turmeric, fennel powder, cayenne, and garam masala.
Increase the heat to medium-high and cook the sauce, stirring often, for about 10 minutes until it thickens and the oil begins to separate from the tomato.
Add the chicken thighs to the pan and stir to coat each piece evenly with the sauce.
Reduce heat to low, cover the pan, and simmer for 15 minutes.
Remove the lid and cook uncovered for an additional 10 minutes, stirring occasionally, until the sauce is reduced and the chicken is cooked through.
Stir in sliced green chili if using, garnish with fresh cilantro, and serve.