Secretary of Defense Robert S. McNamara found himself struggling with a mounting sense of frustration over the Vietnam War. McNamara concluded in early 1967 that a comprehensive analysis of the history of U.S. involvement in post-1945 Vietnam was needed, partly out of a need to answer his own questions about how things had gone wrong. McNamara ordered his Second Military Assistant, Army Lieutenant Colonel Robert G. Gard, to initiate a study into the history of America’s role in Vietnam, with an emphasis on the internal policy-planning and decision-making within the U.S. government. Shortly thereafter, on June 17, 1967, the Vietnam Study Task Force was officially created under the direction of Leslie H. Gelb∇, the director of Policy Planning and Arms Control for International Security Affairs at the Department of Defense.
See also Marc Selverstone's op-ed in the Boston Globe on March 9, 2006, available here.