Following the Japanese Attack on Pearl Harbor and the United States entry into World War II, Foster was recalled to active duty with the rank of Commander in the Naval Reserve and was tasked directly by President Franklin D. Roosevelt to conduct special naval inspections. One of his first mission was to conduct investigation in the Panama Canal Zone following the series of complaints from the Army's Lieutenant general Daniel Van Voorhis, Commander of Caribbean Defense Command on Army-Navy cooperation.