The Prophet ﷺ saw me when I had long hair and said, "An annoyance, an annoyance!" So I went and cut it. When the Prophet ﷺ saw me afterward, he said, "I did not mean you, but this is better."
حدثنا أبو بكر بن أبي شيبة حدثنا معاوية بن هشام وسفيان بن عقبة عن سفيان عن عاصم بن كليب عن أبيه
رآني النبي ﷺ ولي شعر طويل فقال ذباب ذباب فانطلقت فأخذته فرآني النبي ﷺ فقال إني لم أعنك وهذا أحسن
[Its isnad is sahih] Reported by Abu Dawud, chapter of grooming, section on letting the hair grow long, no. 4190, from the hadith of Muawiya bin Hisham via this same chain. Thawri stated explicitly that he heard it directly, as recorded by Nasai, no. 5055.