Pelosi, D-Calif., sent a letter to reschedule the speech three days after he signed a bill to reopen the government.
"When I wrote you on Jan. 23, I stated that we should work together to find a mutually agreeable date when the government has reopened to schedule this year's State of the Union Address," she wrote. "In our conversation today we agreed on Feb. 5."
Trump responded in a letter from the White House, accepting Pelosi's invitation.
"Thank you for your letter inviting me to deliver the State of the Union Address before a joint session of Congress on Tuesday, February 5, 2019," Trump wrote. "It is my great honor to accept. We have a great story to tell and yet, great goals to achieve!"
On Wednesday, Pelosi announced she wouldn't invite Trump to host the State of the Union in the House Chamber until the government reopened.
Trump initially responded that he would give the speech at another venue, but later said via Twitter that he wasn't considering alternative locations and that he would wait to give his address after the government reopens "because there is no venue that can compete with the history, tradition and importance of the House Chamber."
Two days later Trump signed a short-term spending bill, reopening the federal government on Day 35 of the longest shutdown in U.S. history.