To incorporate petai, add them towards the end of cooking. This timing allows the petai to absorb the flavors of the sambal while maintaining their texture and distinctive taste. Adding them too early can cause them to become overcooked and lose their unique crunch.