Yes, Imam Al-Mahdi is granted from Allah ( SWT) the knowledge about our deeds and he feels happy for our good deeds and vice versa. We are encouraged to talk to Imam Al-Mahdi (AS) whenever we want and seek his help, prayers and blessings. Allah (SWT) makes our voice reach to him. We read in the Ziyarah of Ahlul Bayt (AS): I bear witness that you see my place, hear my talk, and reply my Salaam.أشهد أنكم تشهدون مقامي وتسمعون كلامي وتردّون سلامي
Lovers of Allah, the Prophet and Ahlul Bayt never feel lonely. Imam Al-Mahdi is never far away from his lovers and they are always able to talk to him.