USB drives are damaged whenever you write to them, so it's not recommended to run a full OS X install on one.
It will work, but only for a while then you'll have to buy a new thumb drive. According to Wikipedia, how long it will last varies from "a few days" to "several hundred years" depending on your usage pattern.
Booting a normal OS X is probably closer to "a few days", which is why you should only really use the recovery feature - that is designed for thumb drives and won't wear it out too badly.
If you're frequently doing diagnostics/etc you should use a proper HDD or SSD in a USB enclosure. Or even better, thunderbolt.