Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
it’s done this twice in exactly a week and every time I take it to the mechanic the check engine light turns off and they don’t do anything. It’s a 2009 Chevy Aveo
It's probably your IAC valve or Idle Air Control valve. It regulates idle speed. Sometimes they are dirty and can just be cleaned. A new part cost around $20-40.
Another possibility is the throttle body is dirty. This happened to me, in a 2009 Chevy Aveo, but at higher speeds, over 50 MPH, so not a big chance for the lower speeds, but adding this answer in case someone else has the issue at higher RPMs.
Required, but never shown