A nagging idea
A brain bug that won't stop buzzing and won't let you forget it
That idea about my failed math test was like a mosquito in my head.
I had that one idea about eating the whole cake and it wouldn't stop bugging me.
That thought about my dog eating my homework was stuck in my brain like glue.