Deductions & credits

Yes I am an Indian citizen, entered USA in October 2022 and left in August 2024 with J1 visa as I joined a job in India. I visited US in the month of December 2024 again for 7days with B1 visa. 

With these timelines still I am being classified as resident alien to file tax for the year 2024. I want to apply waiver for US-India treaty tax (already deducted from my salary during stay in US) for the year 2024 for now. 

Please suggest in this reagard.