"My ex was sometimes really annoying."
Translation:Mon ex était parfois vraiment énervante.
Because ex starts with a vowel, you use "mon" even for a female ex. The gender becomes clear only because "énervant(e)" is different.
Similar with the pronunciation of "mon ami" and "mon amie". In this case the spelling is different for a male and a female friend, but you can't hear it because "amie" stats with a vowel so also uses "mon" instead of "ma".