The source is Longstreets memoir which is published in the 1890s, well after Custers death. I have seen that account used in several books and none of the authors seem to question its veracity despite the time lapse after the war to when it is in written form like that they do other authors in that same range (Gordon, Chamberlain). It's a great story....if true.
This is also where I saw it. Longstreet describes that up until the last moment when Lee sent his letter to Grant they had been looking for a way to escape, some route that was open, and also that while Lee and Grant had been exchanging letters there wasn't a truce until Lee sent his letter to Grant.
Says Longstreet:
"While this formation [his last battle formation] was proceeding, report came from our front that a break had been found through which we could force passage."
Longstreet then proceeds to send a Col to Lee, to inform him of this way out before he surrendered. However, when this colonel finds Lee, Lee says that the letter has gone beyond recall to Grant. It's just as well because Longstreet writes that he then found out that the supposed way out was a false hope.
In Longstreet words:
"As my troops marched to form the last line a message came from General Lee saying he had not thought to give notice of the intended ride to meet General Grant, and asked to have me send his message to that effect to General Gordon, and it was duly sent by Captain Sims, of the Third Corps staff, serving at my head-quarters since the fall of A. P. Hill.
After delivering the message, Captain Sims, through some informality, was sent to call the truce. The firing ceased. General Custer rode to Captain Sims to know his authority, and, upon finding that he was of my staff, asked to be conducted to my head-quarters, and down they came in fast gallop, General Custer's flaxen locks flowing over his shoulders, and in brusk, excited manner, he said,—
"In the name of General Sheridan I demand the unconditional surrender of this army."
He was reminded that I was not the commander of the army, that he was within the lines of the enemy without authority, addressing a superior officer, and in disrespect to General Grant as well as myself; that if I was the commander of the army I would not receive the message of General Sheridan.
He then became more moderate, saying it would be a pity to have more blood upon that field. Then I suggested that the truce be respected, and said,—
"As you are now more reasonable, I will say that General Lee has gone to meet General Grant, and it is for them to determine the future of the armies."
He was then satisfied and returned to his command."
—————
I don't discredit this account because while Grant was not a witness to it, in his memoirs he does mention Sheridan and his men being really anxious believing the rebels were using a ruse to try to escape. Grant's words:
"I was conducted at once to where Sheridan was located with his troops drawn up in line of battle facing the Confederate army nearby. They were very much excited, and expressed their view that this was all a ruse employed to enable the Confederates to get away. They said they believed that Johnston was marching up from North Carolina now, and Lee was moving to join him; and they would whip the rebels where they now were in five minutes if I would only let them."
Excerpt From
Personal Memoirs of U. S. Grant, Complete
Ulysses S. Grant
This material may be protected by copyright.
I do tend to conclude both that the rebels were looking for a way out up until that moment when Lee sent out that letter to General Grant, and that Sheridan and Meade were both eager to not let them get away. At the point Custer rode into camp, they had agreed only to the briefest truce of a couple of hours to ensure Grant received that letter from Lee.
Cheers.