I've just finished dealing with this problem with my dog. I've spent over 20 hours going through my dog's coat again, and again and again. And again. Coconut oil has been my friend. I put coconut oil on my de-shedding tool and brushes, to work it through his coat. This made it easier to pull the seeds (foxtails/cobblers pegs/etc) out.
After a thorough brushing, I dipped my fingertips in coconut oil, and massaged all over Nitro's body to find the seeds. They were easier to feel than see. I bought a very fine comb, (a headlice comb for humans), also rubbed in coconut oil, to comb them out. I spent a couple of hours thoroughly going over his tail, the boney contours provided crevices for seeds to hide. I found none in Nitro's paws either.
Where any were deeply imbedded, where there was a lump, I shaved the area, washed it in a chlorehexidine solution, and applied a poultice for 24 hours. (I used Magnoplasm, used to draw splinters out of humans.) I put the Magnoplasm on the 8.3 x 6cm flexible fabric dressing and surprisingly, they stayed put. Doing this worked, and Nitro didn't have to go through the ordeal of exploratory surgery.
Every time I pulled out a seed, Nitro got a high value treat. He happily lay there for me for hours while I brushed and massaged, and dispensed treats. His coat looks and smells amazing, and feels so soft and silky after all the coconut oil and grooming. He now comes to me and 'asks' for a massage.
The preventative, I've changed where I exercise my dog.