Joseph Wheelen in his book Their Last Full Measure writes that Davis and Breckenridge authorized Lee to write Lee a letter to Grant in early March 1865 to attempt to to appoint military commissioners to end the war. Lee expressed his doubt to Davis that this would go anywhere. Lee offered to meet Grant on Monday March 6th. Grant sent the letter Stanton and requested instructions. Lincoln and Stanton gave Grant orders that he was not to take up the offer with Lee---that alone was to left to the President. Grant so replied to Lee.
Lee knew it was over. He held a council then with General John Gordan on March 5th of 1865 ( all other commanders were not available) when the ANO was being starved out in Petersburg to seek Gordans view of what to do. Gordan advised that Lee should do one of these in the following order:
1. To make the best surrender terms possible with the AOP.
2.Abandon Richmond and Petersburg and join Johnston.
3. Fight now without delay.
Lee told Gordan that his desire was #1. Lee told Gordan that he had not shared his opinion with Davis because he did not feel comfortable telling the civil authorities to make surrender terms. Lee did not tell Gordan that he had already written to Grant.
The next day Lee met with Davis when Grant's rejection letter arrived. Davis made it clear he would not accept any terms that did not include southern independence.
It was with this background that Lee , believing the war was lost finally surrendered the ANO to Grant on April 9th. He did not seek Davis' permission when he was trapped at Appomattox.....Davis would not have consented.