Heat the oil in a wide pot over medium. Add the curry paste and fry it for a full 2 minutes, stirring, until it darkens slightly and smells sharp. Frying the paste in oil first is the single biggest upgrade over dump-and-simmer curry.
Pour in about a third of the coconut milk and let it bubble with the paste for a minute, then add the rest along with the stock and lime leaves if using.
Bring to a gentle simmer and add the chicken. Keep it at a low simmer, not a boil, for 8 minutes.
Add the green beans and simmer another 5 to 6 minutes, until the beans are tender but still have a slight bite and the chicken is cooked through.
Season with the fish sauce and sugar, taste, and adjust. It should lead salty-savory with a little sweetness behind it.
Turn off the heat and stir in the basil; it wilts in seconds. Top with sliced chili and serve with jasmine rice.