The US Treasury's Internal Revenue Service (IRS) advises that G and A visa holders temporarily present in the United States as a foreign government related individual are non-residents for income tax purposes, no matter how long they have resided in the United States. The situation for a G-5 domestic servant, who is NOT a foreign government related individual is a bit different, and their Federal income tax filing status is determined based on their time in the country.
The US Department of State in a Diplomatic Note dated March 27, 2012 advises:
Why is this important? G-5 and A-3 domestic servants, admitted to the United States to work for staff members of international organizations and missions, must pay US income taxes on their wages. The G-5 or A-3 domestic may be required to file and pay US income taxes using either Form 1040NR or Form 1040NR-EZ. Forms 1040 and 1040-EZ may not be considered proper filings unless the domestic meets the "substantial presence test." Failure to properly report and pay US income taxes will cause the application for visa renewal or visa extension to be denied by the US State Department.
G-4 and A-1 sponsors of the G-5/A-3 domestic servant is, under US law, a withholding agent when the sponsor pays to a domestic income subject to US income taxation. As a withholding agent, the sponsor is personally liable for any tax required to be withheld. This liability is independent of the tax liability of the foreign person to whom the payment is made. If the sponsor fails to withhold and the G-5/A-3 domestic fails to satisfy its U.S. tax liability, then both the sponsor and the foreign person are liable for tax, as well as interest and any applicable penalties. It is a best practice for the G-4 or A-1 sponsor of a domestic servant to withhold US income taxes from the G or A visa holder they employ.
As a general rule, withholding using a status of Single with zero exemptions will closely approximate the amount of US income taxes the non-resident will owe at year end. If the G-5/A-3 domestic qualifies under the "substantial presence test" as a US resident, the withholding calculation that best meets their tax obligations is Single with one exemption. Withholding calculations are approximate - actual tax due is calculated on the actual tax return.