If before the expiration of time prescribed in sections 289A.38 and 289A.40 for the assessment of tax or the filing of a claim for refund, both the commissioner and the taxpayer have consented in writing to the assessment or filing of a claim for refund after that time, the tax may be assessed or the claim for refund filed at any time before the expiration of the agreed-upon period. The period may be extended by later agreements in writing before the expiration of the period previously agreed upon. The taxpayer and the commissioner may also agree to extend the period for collection of the tax.
When a taxpayer consents to an extension of time for the assessment of federal withholding or income taxes, the period in which the commissioner may recompute the tax is also extended, notwithstanding any period of limitations to the contrary, as follows:
(1) for the periods provided in section 289A.38, subdivisions 8 and 9;
(2) for six months following the expiration of the extended federal period of limitations when no change is made by the federal authority. If no change is made by the federal authority, and, but for this subdivision, the commissioner's time period to adjust the tax has expired, and if the commissioner has completed a field audit of the taxpayer, no additional changes resulting in additional tax due or a refund may be made. For purposes of this subdivision, "field audit" has the meaning given it in section 289A.38, subdivision 9.