Thank you for your question regarding your young boy Max who has been coughing on and off. There are quite a number of potential causes for Max's coughing ranging from hairballs (although it doesn't sound like you have seen any), to a foreign body in the throat (a grass blade or similar), to feline asthma, to a lower respiratory tract infection, or even a primary heart issue. If this has been relatively regularly on/off over the last couple of weeks, then I would definitely recommend a follow up visit with your Vet to get a better idea of what might be causing Max's issue here.
As I assume Max is an outside boy, the first thing your Vet may want to do is to sedate him to make sure he doesn't have a grass blade foreign body at the back of his throat causing irritation as well as causing this cough. This is simple to treat - your Vet would just remove the grass (carefully) and put your boy on antibiotics. This is extremely common and I just removed a grass blade from a young cat only a couple of days ago with very similar symptoms. If he or she did check under an anesthetic and nothing was there, then the next step would be to take a chest and throat xray as well as take a fluid sample from the lungs - a procedure called a BAL. These further procedures can help give us information about whether he may have a lung infection, asthma or a heart problem for example.
I really do think it is best to follow this up in the next couple of days if you can. If you can get him to your Vet tomorrow or early next week, this would be fine. In the meantime - worming him would be a good idea. Use an allwormer like drontal or milbemax for this. Even though you haven't seen any hairballs, you could also purchase and start using a hairball treatment from your local pet store in the mean time. Use this twice daily for a week, then once daily ongoing (depending on the product). In tandem with this, it is also important to brush Max 2 - 3 times weekly to remove any loose hair which in turn minimizes the amount he is ingesting when he is grooming! I hope all of the above makes sense? If you have more questions or if I can help in any other way, please do not hesitate to ask! If you would like to accept my answer, please press RATE OUR CONVERSATION (I am not compensated in any other way). Bonuses are always welcome. Thanks! I hope to work with you again soon!
PS: If you have additional questions after you rate the question, you are welcome to request me for additional conversations if I am on-line or by beginning your question "Dr. E..." or "Pet-doc..." and others will leave the questions for me.