It's not addictive like meth or opioids but it definitely has potential for causing withdrawal symptoms.
If i take modafinil 400-800mg for a week every day and than i suddenly stop it's like being much less congnitively sharp, foggy mind, cravings for opioids in my case ( cause they make me enjoy relaxing ). It's actually not that weak dopamine agonist in 600mg doses and it lasts very long. I can get more tired on amphetamines than on modafinil...
It's great productivity boosting stimulant but if it doesn't work for you It's because
1, your tolerance
2, sleep debt ( your sleep was not good for some time probably )
3, derivation of dopamine and other excitatory amines
4, maybe lack of nutrition and lack of proper hydratation. Try 1 liter of watter with 6 tea spoons of sugar + 1/2 (half) tea spoon of salt. Drink it slowly like sipping on tea.
5, Vitamines and minerals...
But without proper break and proper sleep it still won't hold u productive forever. After a few days it's actually wasting to take it without a pause.