Behind the scenes, cabinet secretaries compared notes as they tried to figure out how to respond to a directive from President Trump’s most powerful adviser without angering the president.