Since under the federal law, marijuana is an illegal schedule 1 narcotic deemed to have a “high potential for abuse and no medical value”, federal law does not distinguish between medical and recreational marijuana—any form of the substance is illegal. Anyone found flying with medical marijuana is at risk of being detained, arrested, and prosecuted under federal law.
But the TSA official policy states they will not look specifically for marijuana and are more concerned with passenger safety. Most cases where TSA agents find marijuana in a search are up to the individual agent to decide.