Lee gets some credit, but there was more involved. Ewell probably should have been watching the Peninsula, and Beauregard was not the most trusted source of information in the minds of the CSA War Dept, the de facto head of which was Jeff Davis. I think Davis, and most likely Lee, thought Beauregard was shouting "wolf". But this was not as bad for Lee as it could have been. Petersburg was not immediately taken. But a great opportunity to take the AoP out a Corps at a time was lost.